source: trunk/docs/changelog.txt @ 482

Last change on this file since 482 was 479, checked in by darcy, 7 years ago

Fix RST syntax - underline too short.

File size: 13.4 KB
2PyGreSQL ChangeLog
5Version 4.1 (2013-01-01)
7- Dropped support for Python below 2.5 and PostgreSQL below 8.3.
8- Added support for Python up to 2.7 and PostgreSQL up to 9.2.
9- Particularly, support PQescapeLiteral() and PQescapeIdentifier().
10- The query method of the classic API now supports positional parameters.
11  This an effective way to pass arbitrary or unknown data without worrying
12  about SQL injection or syntax errors (contribution by Patrick TJ McPhee).
13- The classic API now supports a method namedresult() in addition to
14  getresult() and dictresult(), which returns the rows of the result
15  as named tuples if these are supported (Python 2.6 or higher).
16- The classic API has got the new methods begin(), commit(), rollback(),
17  savepoint() and release() for handling transactions.
18- Both classic and DBAPI 2 connections can now be used as context
19  managers for encapsulating transactions.
20- The execute() and executemany() methods now return the cursor object,
21  so you can now write statements like "for row in cursor.execute(...)"
22  (as suggested by Adam Frederick).
23- Binary objects are now automatically escaped and unescaped.
24- Bug in money quoting fixed.  Amounts of $0.00 handled correctly.
25- Proper handling of date and time objects as input.
26- Proper handling of floats with 'nan' or 'inf' values as input.
27- Fixed the set_decimal() function.
28- All DatabaseError instances now have a sqlstate attribute.
29- The getnotify() method can now also return payload strings (#15).
30- Better support for notice processing with the new methods
31  set_notice_receiver() and get_notice_receiver()
32  (as suggested by Michael Filonenko, see #12 and #37).
33- Open transactions are rolled back when pgdb connections are closed
34  (as suggested by Peter Harris, see #46).
35- Connections and cursors can now be used with the "with" statement
36  (as suggested by Peter Harris, see #46).
37- New method use_regtypes() that can be called to let getattnames()
38  return regular type names instead of the simplified classic types (#44).
41Version 4.0 (2009-01-01)
43- Dropped support for Python below 2.3 and PostgreSQL below 7.4.
44- Added support for Python up to 2.6 and PostgreSQL up to 8.3.
45- Improved performance of fetchall() for large result sets
46  by speeding up the type casts (as suggested by Peter Schuller).
47- Exposed exceptions as attributes of the connection object.
48- Exposed connection as attribute of the cursor object.
49- Cursors now support the iteration protocol.
50- Added new method to get parameter settings.
51- Added customizable row_factory as suggested by Simon Pamies.
52- Separated between mandatory and additional type objects.
53- Added keyword args to insert, update and delete methods.
54- Added exception handling for direct copy.
55- Start transactions only when necessary, not after every commit().
56- Release the GIL while making a connection
57  (as suggested by Peter Schuller).
58- If available, use decimal.Decimal for numeric types.
59- Allow DB wrapper to be used with DB-API 2 connections
60  (as suggested by Chris Hilton).
61- Made private attributes of DB wrapper accessible.
62- Dropped dependence on mx.DateTime module.
63- Support for PQescapeStringConn() and PQescapeByteaConn();
64  these are now also used by the internal _quote() functions.
65- Added 'int8' to INTEGER types. New SMALLINT type.
66- Added a way to find the number of rows affected by a query()
67  with the classic pg module by returning it as a string.
68  For single inserts, query() still returns the oid as an integer.
69  The pgdb module already provides the "rowcount" cursor attribute
70  for the same purpose.
71- Improved getnotify() by calling PQconsumeInput() instead of
72  submitting an empty command.
73- Removed compatibility code for old OID munging style.
74- The insert() and update() methods now use the "returning" clause
75  if possible to get all changed values, and they also check in advance
76  whether a subsequent select is possible, so that ongoing transactions
77  won't break if there is no select privilege.
78- Added "protocol_version" and "server_version" attributes.
79- Revived the "user" attribute.
80- The pg module now works correctly with composite primary keys;
81  these are represented as frozensets.
82- Removed the undocumented and actually unnecessary "view" parameter
83  from the get() method.
84- get() raises a nicer ProgrammingError instead of a KeyError
85  if no primary key was found.
86- delete() now also works based on the primary key if no oid available
87  and returns whether the row existed or not.
90Version 3.8.1 (2006-06-05)
92- Use string methods instead of deprecated string functions.
93- Only use SQL-standard way of escaping quotes.
94- Added the functions escape_string() and escape/unescape_bytea()
95  (as suggested by Charlie Dyson and Kavous Bojnourdi a long time ago).
96- Reverted code in clear() method that set date to current.
97- Added code for backwards compatibility in OID munging code.
98- Reorder attnames tests so that "interval" is checked for before "int."
99- If caller supplies key dictionary, make sure that all has a namespace.
101Version 3.8 (2006-02-17)
103- Installed new favicon.ico from Matthew Sporleder <>
104- Replaced snprintf by PyOS_snprintf.
105- Removed NO_SNPRINTF switch which is not needed any longer
106- Clean up some variable names and namespace
107- Add get_relations() method to get any type of relation
108- Rewrite get_tables() to use get_relations()
109- Use new method in get_attnames method to get attributes of views as well
110- Add Binary type
111- Number of rows is now -1 after executing no-result statements
112- Fix some number handling
113- Non-simple types do not raise an error any more
114- Improvements to documentation framework
115- Take into account that nowadays not every table must have an oid column
116- Simplification and improvement of the inserttable() function
117- Fix up unit tests
118- The usual assortment of minor fixes and enhancements
120Version 3.7 (2005-09-07)
122Improvement of pgdb module:
124- Use Python standard `datetime` if `mxDateTime` is not available
126Major improvements and clean-up in classic pg module:
128- All members of the underlying connection directly available in `DB`
129- Fixes to quoting function
130- Add checks for valid database connection to methods
131- Improved namespace support, handle `search_path` correctly
132- Removed old dust and unnessesary imports, added docstrings
133- Internal sql statements as one-liners, smoothed out ugly code
135Version 3.6.2 (2005-02-23)
137- Further fixes to namespace handling
139Version 3.6.1 (2005-01-11)
141- Fixes to namespace handling
143Version 3.6 (2004-12-17)
145- Better DB-API 2.0 compliance
146- Exception hierarchy moved into C module and made available to both APIs
147- Fix error in update method that caused false exceptions
148- Moved to standard exception hierarchy in classic API
149- Added new method to get transaction state
150- Use proper Python constants where appropriate
151- Use Python versions of strtol, etc. Allows Win32 build.
152- Bug fixes and cleanups
154Version 3.5 (2004-08-29)
156Fixes and enhancements:
158- Add interval to list of data types
159- fix up method wrapping especially close()
160- retry pkeys once if table missing in case it was just added
161- wrap query method separately to handle debug better
162- use isinstance instead of type
163- fix free/PQfreemem issue - finally
164- miscellaneous cleanups and formatting
166Version 3.4 (2004-06-02)
168Some cleanups and fixes.
169This is the first version where PyGreSQL is moved back out of the
170PostgreSQL tree. A lot of the changes mentioned below were actually
171made while in the PostgreSQL tree since their last release.
173- Allow for larger integer returns
174- Return proper strings for true and false
175- Cleanup convenience method creation
176- Enhance debugging method
177- Add reopen method
178- Allow programs to preload field names for speedup
179- Move OID handling so that it returns long instead of int
180- Miscellaneous cleanups and formatting
182Version 3.3 (2001-12-03)
184A few cleanups.  Mostly there was some confusion about the latest version
185and so I am bumping the number to keep it straight.
187- Added NUMERICOID to list of returned types. This fixes a bug when
188  returning aggregates in the latest version of PostgreSQL.
190Version 3.2 (2001-06-20)
192Note that there are very few changes to PyGreSQL between 3.1 and 3.2.
193The main reason for the release is the move into the PostgreSQL
194development tree.  Even the WIN32 changes are pretty minor.
196- Add Win32 support (
197- Fix some DB-API quoting problems (
198- Moved development into PostgreSQL development tree.
200Version 3.1 (2000-11-06)
202- Fix some quoting functions.  In particular handle NULLs better.
203- Use a method to add primary key information rather than direct
204  manipulation of the class structures
205- Break decimal out in `_quote` (in and treat it as float
206- Treat timestamp like date for quoting purposes
207- Remove a redundant SELECT from the `get` method speeding it,
208  and `insert` (since it calls `get`) up a little.
209- Add test for BOOL type in typecast method to `pgdbTypeCache` class
210  (
211- Fix to send port as integer to lower level function
212  (
213- Change to speed up some operations
214- Allow updates on tables with no primary keys
216Version 3.0 (2000-05-30)
218- Remove strlen() call from pglarge_write() and get size from object
219  (
220- Add a little more error checking to the quote function in the wrapper
221- Add extra checking in `_quote` function
222- Wrap query in for debugging
223- Add DB-API 2.0 support to pgmodule.c (
224- Add DB-API 2.0 wrapper (
225- Correct keyword clash (temp) in tutorial
226- Clean up layout of tutorial
227- Return NULL values as None (
228  (WARNING: This will cause backwards compatibility issues)
229- Change None to NULL in insert and update
230- Change hash-bang lines to use /usr/bin/env
231- Clearing date should be blank (NULL) not TODAY
232- Quote backslashes in strings in `_quote` (brian@CSUA.Berkeley.EDU)
233- Expanded and clarified build instructions (
234- Make code thread safe (
235- Add README.distutils ( &
236- Many fixes and increased DB-API compliance by,
237, and others to get the final
238  version ready to release.
240Version 2.4 (1999-06-15)
242- Insert returns None if the user doesn't have select permissions
243  on the table.  It can (and does) happen that one has insert but
244  not select permissions on a table.
245- Added ntuples() method to query object (
246- Corrected a bug related to getresult() and the money type
247- Corrected a bug related to negative money amounts
248- Allow update based on primary key if munged oid not available and
249  table has a primary key
250- Add many __doc__ strings (
251- Get method works with views if key specified
253Version 2.3 (1999-04-17)
255- returns "localhost" when connected to Unix socket
256  (
257- Use `PyArg_ParseTupleAndKeywords` in connect() (
258- fixes and cleanups (
259- Fixed memory leak in dictresult() (
260- Deprecated - functionality now in
261- More cleanups to the tutorial
262- Added fileno() method - (Mikhail Terekhov)
263- added money type to quoting function
264- Compiles cleanly with more warnings turned on
265- Returns PostgreSQL error message on error
266- Init accepts keywords (Jarkko Torppa)
267- Convenience functions can be overridden (Jarkko Torppa)
268- added close() method
270Version 2.2 (1998-12-21)
272- Added user and password support thanks to Ng Pheng Siong (
273- Insert queries return the inserted oid
274- Add new `pg` wrapper (C module renamed to _pg)
275- Wrapped database connection in a class
276- Cleaned up some of the tutorial.  (More work needed.)
277- Added `version` and `__version__`.
278  Thanks to for the suggestion.
280Version 2.1 (1998-03-07)
282- return fields as proper Python objects for field type
283- Cleaned up
284- Added dictresult method
286Version 2.0  (1997-12-23)
288- Updated code for PostgreSQL 6.2.1 and Python 1.5
289- Reformatted code and converted to use full ANSI style prototypes
290- Changed name to PyGreSQL (from PyGres95)
291- Changed order of arguments to connect function
292- Created new type `pgqueryobject` and moved certain methods to it
293- Added a print function for pgqueryobject
294- Various code changes - mostly stylistic
296Version 1.0b (1995-11-04)
298- Keyword support for connect function moved from library file to C code
299  and taken away from library
300- Rewrote documentation
301- Bug fix in connect function
302- Enhancements in large objects interface methods
304Version 1.0a (1995-10-30)
306A limited release.
308- Module adapted to standard Python syntax
309- Keyword support for connect function in library file
310- Rewrote default parameters interface (internal use of strings)
311- Fixed minor bugs in module interface
312- Redefinition of error messages
314Version 0.9b (1995-10-10)
316The first public release.
318- Large objects implementation
319- Many bug fixes, enhancements, ...
321Version 0.1a (1995-10-07)
323- Basic libpq functions (SQL access)
Note: See TracBrowser for help on using the repository browser.