source: trunk/docs/changelog.rst @ 515

Last change on this file since 515 was 515, checked in by D'Arcy J.M. Cain, 7 years ago

Version 4.1.1 tagged and bagged. On to 4.2.

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