source: trunk/docs/changelog.rst @ 693

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

Support copy_from() and copy_to() in pgdb

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