blob: 24c38e9fde9d7d5d86a6a9e85fbec07c70169a9d [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>PyGreSQL ChangeLog</title>
<link rel="stylesheet" href="docs.css" type="text/css" />
</head>
<body>
<div class="document" id="pygresql-changelog">
<h1 class="title">PyGreSQL ChangeLog</h1>
<div class="section">
<h1><a id="version-4-0-2009-01-01" name="version-4-0-2009-01-01">Version 4.0 (2009-01-01)</a></h1>
<ul class="simple">
<li>Dropped support for Python below 2.3 and PostgreSQL below 7.4.</li>
<li>Improved performance of fetchall() for large result sets
by speeding up the type casts (as suggested by Peter Schuller).</li>
<li>Exposed exceptions as attributes of the connection object.</li>
<li>Exposed connection as attribute of the cursor object.</li>
<li>Cursors now support the iteration protocol.</li>
<li>Added new method to get parameter settings.</li>
<li>Added customizable row_factory as suggested by Simon Pamies.</li>
<li>Separated between mandatory and additional type objects.</li>
<li>Added keyword args to insert, update and delete methods.</li>
<li>Added exception handling for direct copy.</li>
<li>Release the GIL while making a connection
(as suggested by Peter Schuller).</li>
<li>If available, use decimal.Decimal for numeric types.</li>
<li>Allow DB wrapper to be used with DB-API 2 connections
(as suggested by Chris Hilton).</li>
<li>Made private attributes of DB wrapper accessible.</li>
<li>Dropped dependence on mx.DateTime module.</li>
<li>Support for PQescapeStringConn() and PQescapeByteaConn();
these are now also used by the internal _quote() functions.</li>
<li>Added 'int8' to INTEGER types. New SMALLINT type.</li>
<li>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 &quot;rowcount&quot; cursor attribute
for the same purpose.</li>
<li>Improved getnotify() by calling PQconsumeInput() instead of
submitting an empty command.</li>
<li>Removed compatibility code for old OID munging style.</li>
<li>The insert() and update() methods now use the &quot;returning&quot; 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.</li>
<li>Added &quot;protocol_version&quot; and &quot;server_version&quot; attributes.</li>
<li>Revived the &quot;user&quot; attribute.</li>
<li>The pg module now works correctly with composite primary keys;
these are represented as frozensets.</li>
<li>Removed the undocumented and actually unnecessary &quot;view&quot; parameter
from the get() method.</li>
<li>get() raises a nicer ProgrammingError instead of a KeyError
if no primary key was found.</li>
<li>delete() now also works based on the primary key if no oid available
and returns whether the row existed or not.</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-8-1-2006-06-05" name="version-3-8-1-2006-06-05">Version 3.8.1 (2006-06-05)</a></h1>
<ul class="simple">
<li>Use string methods instead of deprecated string functions.</li>
<li>Only use SQL-standard way of escaping quotes.</li>
<li>Added the functions escape_string() and escape/unescape_bytea()
(as suggested by Charlie Dyson and Kavous Bojnourdi a long time ago).</li>
<li>Reverted code in clear() method that set date to current.</li>
<li>Added code for backwards compatibility in OID munging code.</li>
<li>Reorder attnames tests so that &quot;interval&quot; is checked for before &quot;int.&quot;</li>
<li>If caller supplies key dictionary, make sure that all has a namespace.</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-8-2006-02-17" name="version-3-8-2006-02-17">Version 3.8 (2006-02-17)</a></h1>
<ul class="simple">
<li>Installed new favicon.ico from Matthew Sporleder &lt;<a class="reference" href="mailto:mspo&#64;mspo.com">mspo&#64;mspo.com</a>&gt;</li>
<li>Replaced snprintf by PyOS_snprintf.</li>
<li>Removed NO_SNPRINTF switch which is not needed any longer</li>
<li>Clean up some variable names and namespace</li>
<li>Add get_relations() method to get any type of relation</li>
<li>Rewrite get_tables() to use get_relations()</li>
<li>Use new method in get_attnames method to get attributes of views as well</li>
<li>Add Binary type</li>
<li>Number of rows is now -1 after executing no-result statements</li>
<li>Fix some number handling</li>
<li>Non-simple types do not raise an error any more</li>
<li>Improvements to documentation framework</li>
<li>Take into account that nowadays not every table must have an oid column</li>
<li>Simplification and improvement of the inserttable() function</li>
<li>Fix up unit tests</li>
<li>The usual assortment of minor fixes and enhancements</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-7-2005-09-07" name="version-3-7-2005-09-07">Version 3.7 (2005-09-07)</a></h1>
<p>Improvement of pgdb module:</p>
<ul class="simple">
<li>Use Python standard <cite>datetime</cite> if <cite>mxDateTime</cite> is not available</li>
</ul>
<p>Major improvements and clean-up in classic pg module:</p>
<ul class="simple">
<li>All members of the underlying connection directly available in <cite>DB</cite></li>
<li>Fixes to quoting function</li>
<li>Add checks for valid database connection to methods</li>
<li>Improved namespace support, handle <cite>search_path</cite> correctly</li>
<li>Removed old dust and unnessesary imports, added docstrings</li>
<li>Internal sql statements as one-liners, smoothed out ugly code</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-6-2-2005-02-23" name="version-3-6-2-2005-02-23">Version 3.6.2 (2005-02-23)</a></h1>
<ul class="simple">
<li>Further fixes to namespace handling</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-6-1-2005-01-11" name="version-3-6-1-2005-01-11">Version 3.6.1 (2005-01-11)</a></h1>
<ul class="simple">
<li>Fixes to namespace handling</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-6-2004-12-17" name="version-3-6-2004-12-17">Version 3.6 (2004-12-17)</a></h1>
<ul class="simple">
<li>Better DB-API 2.0 compliance</li>
<li>Exception hierarchy moved into C module and made available to both APIs</li>
<li>Fix error in update method that caused false exceptions</li>
<li>Moved to standard exception hierarchy in classic API</li>
<li>Added new method to get transaction state</li>
<li>Use proper Python constants where appropriate</li>
<li>Use Python versions of strtol, etc. Allows Win32 build.</li>
<li>Bug fixes and cleanups</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-5-2004-08-29" name="version-3-5-2004-08-29">Version 3.5 (2004-08-29)</a></h1>
<p>Fixes and enhancements:</p>
<ul class="simple">
<li>Add interval to list of data types</li>
<li>fix up method wrapping especially close()</li>
<li>retry pkeys once if table missing in case it was just added</li>
<li>wrap query method separately to handle debug better</li>
<li>use isinstance instead of type</li>
<li>fix free/PQfreemem issue - finally</li>
<li>miscellaneous cleanups and formatting</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-4-2004-06-02" name="version-3-4-2004-06-02">Version 3.4 (2004-06-02)</a></h1>
<p>Some cleanups and fixes.
This is the first version where PyGreSQL is moved back out of the
PostgreSQL tree. A lot of the changes mentioned below were actually
made while in the PostgreSQL tree since their last release.</p>
<ul class="simple">
<li>Allow for larger integer returns</li>
<li>Return proper strings for true and false</li>
<li>Cleanup convenience method creation</li>
<li>Enhance debugging method</li>
<li>Add reopen method</li>
<li>Allow programs to preload field names for speedup</li>
<li>Move OID handling so that it returns long instead of int</li>
<li>Miscellaneous cleanups and formatting</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-3-2001-12-03" name="version-3-3-2001-12-03">Version 3.3 (2001-12-03)</a></h1>
<p>A few cleanups. Mostly there was some confusion about the latest version
and so I am bumping the number to keep it straight.</p>
<ul class="simple">
<li>Added NUMERICOID to list of returned types. This fixes a bug when
returning aggregates in the latest version of PostgreSQL.</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-2-2001-06-20" name="version-3-2-2001-06-20">Version 3.2 (2001-06-20)</a></h1>
<p>Note that there are very few changes to PyGreSQL 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.</p>
<ul class="simple">
<li>Add Win32 support (<a class="reference" href="mailto:gerhard&#64;bigfoot.de">gerhard&#64;bigfoot.de</a>)</li>
<li>Fix some DB-API quoting problems (<a class="reference" href="mailto:niall.smart&#64;ebeon.com">niall.smart&#64;ebeon.com</a>)</li>
<li>Moved development into PostgreSQL development tree.</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-1-2000-11-06" name="version-3-1-2000-11-06">Version 3.1 (2000-11-06)</a></h1>
<ul class="simple">
<li>Fix some quoting functions. In particular handle NULLs better.</li>
<li>Use a method to add primary key information rather than direct
manipulation of the class structures</li>
<li>Break decimal out in <cite>_quote</cite> (in pg.py) and treat it as float</li>
<li>Treat timestamp like date for quoting purposes</li>
<li>Remove a redundant SELECT from the <cite>get</cite> method speeding it,
and <cite>insert</cite> (since it calls <cite>get</cite>) up a little.</li>
<li>Add test for BOOL type in typecast method to <cite>pgdbTypeCache</cite> class
(<a class="reference" href="mailto:tv&#64;beamnet.de">tv&#64;beamnet.de</a>)</li>
<li>Fix pgdb.py to send port as integer to lower level function
(<a class="reference" href="mailto:dildog&#64;l0pht.com">dildog&#64;l0pht.com</a>)</li>
<li>Change pg.py to speed up some operations</li>
<li>Allow updates on tables with no primary keys</li>
</ul>
</div>
<div class="section">
<h1><a id="version-3-0-2000-05-30" name="version-3-0-2000-05-30">Version 3.0 (2000-05-30)</a></h1>
<ul class="simple">
<li>Remove strlen() call from pglarge_write() and get size from object
(<a class="reference" href="mailto:Richard&#64;Bouska.cz">Richard&#64;Bouska.cz</a>)</li>
<li>Add a little more error checking to the quote function in the wrapper</li>
<li>Add extra checking in <cite>_quote</cite> function</li>
<li>Wrap query in pg.py for debugging</li>
<li>Add DB-API 2.0 support to pgmodule.c (<a class="reference" href="mailto:andre&#64;via.ecp.fr">andre&#64;via.ecp.fr</a>)</li>
<li>Add DB-API 2.0 wrapper pgdb.py (<a class="reference" href="mailto:andre&#64;via.ecp.fr">andre&#64;via.ecp.fr</a>)</li>
<li>Correct keyword clash (temp) in tutorial</li>
<li>Clean up layout of tutorial</li>
<li>Return NULL values as None (<a class="reference" href="mailto:rlawrence&#64;lastfoot.com">rlawrence&#64;lastfoot.com</a>)
(WARNING: This will cause backwards compatibility issues)</li>
<li>Change None to NULL in insert and update</li>
<li>Change hash-bang lines to use /usr/bin/env</li>
<li>Clearing date should be blank (NULL) not TODAY</li>
<li>Quote backslashes in strings in <cite>_quote</cite> (<a class="reference" href="mailto:brian&#64;CSUA.Berkeley.EDU">brian&#64;CSUA.Berkeley.EDU</a>)</li>
<li>Expanded and clarified build instructions (<a class="reference" href="mailto:tbryan&#64;starship.python.net">tbryan&#64;starship.python.net</a>)</li>
<li>Make code thread safe (<a class="reference" href="mailto:Jerome.Alet&#64;unice.fr">Jerome.Alet&#64;unice.fr</a>)</li>
<li>Add README.distutils (<a class="reference" href="mailto:mwa&#64;gate.net">mwa&#64;gate.net</a> &amp; <a class="reference" href="mailto:jeremy&#64;cnri.reston.va.us">jeremy&#64;cnri.reston.va.us</a>)</li>
<li>Many fixes and increased DB-API compliance by <a class="reference" href="mailto:chifungfan&#64;yahoo.com">chifungfan&#64;yahoo.com</a>,
<a class="reference" href="mailto:tony&#64;printra.net">tony&#64;printra.net</a>, <a class="reference" href="mailto:jeremy&#64;alum.mit.edu">jeremy&#64;alum.mit.edu</a> and others to get the final
version ready to release.</li>
</ul>
</div>
<div class="section">
<h1><a id="version-2-4-1999-06-15" name="version-2-4-1999-06-15">Version 2.4 (1999-06-15)</a></h1>
<ul class="simple">
<li>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.</li>
<li>Added ntuples() method to query object (<a class="reference" href="mailto:brit&#64;druid.net">brit&#64;druid.net</a>)</li>
<li>Corrected a bug related to getresult() and the money type</li>
<li>Corrected a bug related to negative money amounts</li>
<li>Allow update based on primary key if munged oid not available and
table has a primary key</li>
<li>Add many __doc__ strings (<a class="reference" href="mailto:andre&#64;via.ecp.fr">andre&#64;via.ecp.fr</a>)</li>
<li>Get method works with views if key specified</li>
</ul>
</div>
<div class="section">
<h1><a id="version-2-3-1999-04-17" name="version-2-3-1999-04-17">Version 2.3 (1999-04-17)</a></h1>
<ul class="simple">
<li>connect.host returns &quot;localhost&quot; when connected to Unix socket
(<a class="reference" href="mailto:torppa&#64;tuhnu.cutery.fi">torppa&#64;tuhnu.cutery.fi</a>)</li>
<li>Use <cite>PyArg_ParseTupleAndKeywords</cite> in connect() (<a class="reference" href="mailto:torppa&#64;tuhnu.cutery.fi">torppa&#64;tuhnu.cutery.fi</a>)</li>
<li>fixes and cleanups (<a class="reference" href="mailto:torppa&#64;tuhnu.cutery.fi">torppa&#64;tuhnu.cutery.fi</a>)</li>
<li>Fixed memory leak in dictresult() (<a class="reference" href="mailto:terekhov&#64;emc.com">terekhov&#64;emc.com</a>)</li>
<li>Deprecated pgext.py - functionality now in pg.py</li>
<li>More cleanups to the tutorial</li>
<li>Added fileno() method - <a class="reference" href="mailto:terekhov&#64;emc.com">terekhov&#64;emc.com</a> (Mikhail Terekhov)</li>
<li>added money type to quoting function</li>
<li>Compiles cleanly with more warnings turned on</li>
<li>Returns PostgreSQL error message on error</li>
<li>Init accepts keywords (Jarkko Torppa)</li>
<li>Convenience functions can be overridden (Jarkko Torppa)</li>
<li>added close() method</li>
</ul>
</div>
<div class="section">
<h1><a id="version-2-2-1998-12-21" name="version-2-2-1998-12-21">Version 2.2 (1998-12-21)</a></h1>
<ul class="simple">
<li>Added user and password support thanks to Ng Pheng Siong (<a class="reference" href="mailto:ngps&#64;post1.com">ngps&#64;post1.com</a>)</li>
<li>Insert queries return the inserted oid</li>
<li>Add new <cite>pg</cite> wrapper (C module renamed to _pg)</li>
<li>Wrapped database connection in a class</li>
<li>Cleaned up some of the tutorial. (More work needed.)</li>
<li>Added <cite>version</cite> and <cite>__version__</cite>.
Thanks to <a class="reference" href="mailto:thilo&#64;eevolute.com">thilo&#64;eevolute.com</a> for the suggestion.</li>
</ul>
</div>
<div class="section">
<h1><a id="version-2-1-1998-03-07" name="version-2-1-1998-03-07">Version 2.1 (1998-03-07)</a></h1>
<ul class="simple">
<li>return fields as proper Python objects for field type</li>
<li>Cleaned up pgext.py</li>
<li>Added dictresult method</li>
</ul>
</div>
<div class="section">
<h1><a id="version-2-0-1997-12-23" name="version-2-0-1997-12-23">Version 2.0 (1997-12-23)</a></h1>
<ul class="simple">
<li>Updated code for PostgreSQL 6.2.1 and Python 1.5</li>
<li>Reformatted code and converted to use full ANSI style prototypes</li>
<li>Changed name to PyGreSQL (from PyGres95)</li>
<li>Changed order of arguments to connect function</li>
<li>Created new type <cite>pgqueryobject</cite> and moved certain methods to it</li>
<li>Added a print function for pgqueryobject</li>
<li>Various code changes - mostly stylistic</li>
</ul>
</div>
<div class="section">
<h1><a id="version-1-0b-1995-11-04" name="version-1-0b-1995-11-04">Version 1.0b (1995-11-04)</a></h1>
<ul class="simple">
<li>Keyword support for connect function moved from library file to C code
and taken away from library</li>
<li>Rewrote documentation</li>
<li>Bug fix in connect function</li>
<li>Enhancements in large objects interface methods</li>
</ul>
</div>
<div class="section">
<h1><a id="version-1-0a-1995-10-30" name="version-1-0a-1995-10-30">Version 1.0a (1995-10-30)</a></h1>
<p>A limited release.</p>
<ul class="simple">
<li>Module adapted to standard Python syntax</li>
<li>Keyword support for connect function in library file</li>
<li>Rewrote default parameters interface (internal use of strings)</li>
<li>Fixed minor bugs in module interface</li>
<li>Redefinition of error messages</li>
</ul>
</div>
<div class="section">
<h1><a id="version-0-9b-1995-10-10" name="version-0-9b-1995-10-10">Version 0.9b (1995-10-10)</a></h1>
<p>The first public release.</p>
<ul class="simple">
<li>Large objects implementation</li>
<li>Many bug fixes, enhancements, ...</li>
</ul>
</div>
<div class="section">
<h1><a id="version-0-1a-1995-10-07" name="version-0-1a-1995-10-07">Version 0.1a (1995-10-07)</a></h1>
<ul class="simple">
<li>Basic libpq functions (SQL access)</li>
</ul>
</div>
</div>
</body>
</html>