source: trunk/docs/changelog.rst @ 509

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

Prepare for 4.1.1 bugfix release.

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