PyGreSQL 3.7 released

D'Arcy J.M. Cain darcy at
Wed Sep 7 14:07:56 CEST 2005

Announce: Release of PyGreSQL version 3.7

PyGreSQL v3.7 has been released.
It is available at:
If you are running NetBSD, look in the packages directory under
databases. There is also a package in the FreeBSD ports

>From March 1 2001 the PyGreSQL development has moved into the PostgreSQL
development tree.  Starting with the 3.3 release it has been moved back
to a separate project.

PostgreSQL is a database system derived from Postgres4.2. It conforms
to (most of) ANSI SQL and offers many interesting capabilities (C
dynamic linking for functions or type definition, etc.). This package
is copyright by the Regents of the University of California, and is
freely distributable.

Python is an interpreted programming language. It is object oriented,
simple to use (light syntax, simple and straightforward statements), and
has many extensions for building GUIs, interfacing with WWW, etc.  An
intelligent web  browser (HotJava like) is currently under development
(November 1995), and this should open programmers many doors. Python is
copyrighted by Stichting S Mathematisch Centrum, Amsterdam, The
Netherlands, and is freely distributable.

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.

PyGreSQL 2.0 was developed and tested on a NetBSD 1.3_BETA system.  It
is based on the PyGres95 code written by Pascal Andre,
andre at  I changed the version to 2.0 and updated the
code for Python 1.5 and PostgreSQL 6.2.1.  While I was at it I upgraded
the code to use full ANSI style prototypes and changed the order of
arguments to connect.  Later versions are fixes and enhancements to
that. The latest version of PyGreSQL works with Python 1.5.2 and
PostgreSQL 7.0.x

Important changes from PyGreSQL 3.6.2 to PyGreSQL 3.7
  - Fixes to quoting function.
  - Use Python datetime if mxDatetime is not available.
  - Add checks for valid database connection to methods.
  - Improved namespace support, handle search_path correctly.
  - Removed old dust and unnessesary imports, added docstrings.
  - Internal sql statements as one-liners, smoothed out ugly code.
  - Major improvements in classic pg module.

Important changes from PyGreSQL 3.5 to PyGreSQL 3.6.2
  - Further fixes to namespace handling

Important changes from PyGreSQL 3.5 to PyGreSQL 3.6.1
  - Fix namespace handling

Important changes from PyGreSQL 3.5 to PyGreSQL 3.6
  - Better DB-API 2.0 compliance
  - Exception hierarchy moved into C module and made available to both
  - Fix error in update method that caused false exceptions
  - Moved to standard exception hierarchy in classic API
  - Added new method to get transaction state
  - Use proper Python constants where appropriate
  - Use Python versions of strtol, etc.  Allows WIN32 build
  - Bug fixes and cleanups

Important changes from PyGreSQL 3.4 to PyGreSQL 3.5
  - Add interval to list of data types
  - fix up method wrapping especially close()
  - retry pkeys once if table missing in case it was just added
  - wrap query method separately to handle debug better
  - use isinstance instead of type
  - fix free/PQfreemem issue - finally

Important changes from PyGreSQL 3.3 to PyGreSQL 3.4
  - Moved back out of PostgreSQL tree
  - Allow for larger integer returns
  - Return proper strings for true and false
  - Cleanup convenience method creation
  - Enhance debugging method
  - Add reopen method
  - Allow programs to preload field names for speedup
  - Move OID handling so that it returns long instead of int
  - Miscellaneous cleanups and formatting

Important changes from PyGreSQL 3.2 to PyGreSQL 3.3
  - Added NUMERICOID to list of returned types.  This fixes a bug when
    returning aggregates in the latest version of PostgreSQL.

Important changes from PyGreSQL 3.1 to PyGreSQL 3.2
  Note that there are very few changes to PostgreSQL between 3.1 and
  3.2.  The main reason for the release is the move into the PostgreSQL
  development tree.  Even the WIN32 changes are pretty minor.
  - Add WIN32 support (gerhard at
  - Fix some DB-API quoting problems ( at
  - Moved development into PostgreSQL development tree.

Important changes from PyGreSQL 3.0 to PyGreSQL 3.1
  - Fix some quoting functions.  In particular handle NULLs better.
  - Use a method to add primary key information rather than direct
    manipulation of the class structures.
  - Break decimal out in _quote (in and treat it as float.
  - Treat timestamp like date for quoting purposes.
  - Remove a redundant SELECT from the get method speeding it, and
insert since it calls get, up a little.
  - Add test for BOOL type in typecast method to pgdbTypeCache class.
    (tv at
  - Fix to send port as integer to lower level function
    (dildog at
  - Change to speed up some operations
  - Allow updates on tables with no primary keys.

Important changes from PyGreSQL 2.4 to PyGreSQL 3.0:
  - Remove strlen() call from pglarge_write() and get size from object.
    (Richard at
  - Add a little more error checking to the quote function in the
  - Add extra checking in _quote function
  - Wrap query in for debugging
  - Add DB-API 2.0 support to pgmodule.c (andre at
  - Add DB-API 2.0 wrapper (andre at
  - Correct keyword clash (temp) in tutorial
  - Clean up layout of tutorial
  - Return NULL values as None (rlawrence at (WARNING: This
    will cause backwards compatibility issues.)
  - Change None to NULL in insert and update
  - Change hash-bang lines to use /usr/bin/env
  - Clearing date should be blank (NULL) not TODAY
  - Quote backslashes in strings in _quote (brian at CSUA.Berkeley.EDU)
  - Expanded and clarified build instructions
(tbryan at
  - Make code thread safe (Jerome.Alet at
  - Add README.distutils (mwa at & jeremy at
  - Many fixes and increased DB-API compliance by chifungfan at,
    tony at, jeremy at and others to get the final
    version ready to release.

Important changes from PyGreSQL 2.3 to PyGreSQL 2.4:
  - Insert returns None if the user doesn't have select permissions
    on the table.  It can (and does) happen that one has insert but
    not select permissions on a table.
  - Added ntuples() method to query object (brit at
  - Corrected a bug related to getresult() and the money type
  - Corrected a bug related to negative money amounts
  - Allow update based on primary key if munged oid not available and
    table has a primary key
  - Add many __doc__ strings. (andre at
  - Get method works with views if key specified

Important changes from PyGreSQL 2.2 to PyGreSQL 2.3:
  - returns "localhost" when connected to Unix socket
    (torppa at
  - Use PyArg_ParseTupleAndKeywords in connect()
(torppa at
  - fixes and cleanups (torppa at
  - Fixed memory leak in dictresult() (terekhov at
  - Deprecated - functionality now in
  - More cleanups to the tutorial
  - Added fileno() method - terekhov at (Mikhail Terekhov)
  - added money type to quoting function
  - Compiles cleanly with more warnings turned on
  - Returns PostgreSQL error message on error
  - Init accepts keywords (Jarkko Torppa)
  - Convenience functions can be overridden (Jarkko Torppa)
  - added close() method

Important changes from PyGreSQL 2.1 to PyGreSQL 2.2:
  - Added user and password support thanks to Ng Pheng Siong
<ngps at>
  - Insert queries return the inserted oid
  - Add new pg wrapper (C module renamed to _pg)
  - Wrapped database connection in a class.
  - Cleaned up some of the tutorial.  (More work needed.)
  - Added version and __version__.  Thanks to thilo at for
    the suggestion.

Important changes from PyGreSQL 2.0 to PyGreSQL 2.1:
  - return fields as proper Python objects for field type
  - Cleaned up
  - Added dictresult method

Important changes from Pygres95 1.0b to PyGreSQL 2.0:
  - Updated code for PostgreSQL 6.2.1 and Python 1.5.
  - Reformatted code and converted to ANSI .
  - Changed name to PyGreSQL (from PyGres95.)
  - Changed order of arguments to connect function.
  - Created new type pgqueryobject and moved certain methods to it.
  - Added a print function for pgqueryobject
  - Various code changes - mostly stylistic.

For more information about each package, please have a look to their
web pages:
  - Python :
  - PostgreSQL :
  - PyGreSQL :

D'Arcy J.M. Cain
darcy at

D'Arcy J.M. Cain
PyGreSQL Development Group

More information about the Python-announce-list mailing list