Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Release of PyGreSQL 4.0

Reply
Thread Tools

Release of PyGreSQL 4.0

 
 
D'Arcy J.M. Cain
Guest
Posts: n/a
 
      01-01-2009
We are please to announce the release of PyGreSQL 4.0. his is a major
release and you should check it carefully before using in existing
applications. There may be some incompatibilities.

PyGreSQL is a Python module that interfaces to a PostgreSQL
database. It embeds the PostgreSQL query library to allow easy use of
the powerful PostgreSQL features from a Python script.

For more information, please visit http://www.PyGreSQL.org/.

>From the changelog:

- Dropped support for Python below 2.3 and PostgreSQL below 7.4.
- Improved performance of fetchall() for large result sets
by speeding up the type casts (as suggested by Peter Schuller).
- Exposed exceptions as attributes of the connection object.
- Exposed connection as attribute of the cursor object.
- Cursors now support the iteration protocol.
- Added new method to get parameter settings.
- Added customizable row_factory as suggested by Simon Pamies.
- Separated between mandatory and additional type objects.
- Added keyword args to insert, update and delete methods.
- Added exception handling for direct copy.
- Release the GIL while making a connection
(as suggested by Peter Schuller).
- If available, use decimal.Decimal for numeric types.
- Allow DB wrapper to be used with DB-API 2 connections
(as suggested by Chris Hilton).
- Made private attributes of DB wrapper accessible.
- Dropped dependence on mx.DateTime module.
- Support for PQescapeStringConn() and PQescapeByteaConn();
these are now also used by the internal _quote() functions.
- Added 'int8' to INTEGER types. New SMALLINT type.
- Added a way to find the number of rows affected by a query()
with the classic pg module by returning it as a string.
For single inserts, query() still returns the oid as an integer.
The pgdb module already provides the "rowcount" cursor attribute
for the same purpose.
- Improved getnotify() by calling PQconsumeInput() instead of
submitting an empty command.
- Removed compatibility code for old OID munging style.
- The insert() and update() methods now use the "returning" clause
if possible to get all changed values, and they also check in advance
whether a subsequent select is possible, so that ongoing transactions
won't break if there is no select privilege.
- Added "protocol_version" and "server_version" attributes.
- Revived the "user" attribute.
- The pg module now works correctly with composite primary keys;
these are represented as frozensets.
- Removed the undocumented and actually unnecessary "view" parameter
from the get() method.
- get() raises a nicer ProgrammingError instead of a KeyError
if no primary key was found.
- delete() now also works based on the primary key if no oid available
and returns whether the row existed or not.

--
D'Arcy J.M. Cain
PyGreSQL Development Group
http://www.PyGreSQL.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PyQt + PygreSQL Neil Zanella Python 2 08-11-2004 07:19 PM
Anyone know a good Pygresql Tutorial for Interfacing betweenPython &Postgresql Chuck Amadi Python 4 06-19-2004 05:57 AM
How to use Python + PygreSQL on a WinXP system Radu Stanciu Python 2 02-18-2004 12:53 PM
Has anybody got PyGresql working on Python 2.3 or later? Benjamin Arai Python 0 02-01-2004 05:57 PM
pygresql trewornan Python 1 06-28-2003 02:55 AM



Advertisments