source: trunk/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.

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