source: trunk/docs/changelog.rst @ 482

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

I've also tested everything with PostgreSQL 9.2.

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