source: branches/4.x/docs/contents/changelog.rst @ 745

Last change on this file since 745 was 745, checked in by cito, 4 years ago

Add methods get/set_parameter to DB wrapper class

These methods can be used to get/set/reset run-time parameters,
even several at once.

Since this is pretty useful and will not break anything, I have
also back ported these additions to the 4.x branch.

Everything is well documented and tested, of course.

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