| <?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 - Python interface for PostgreSQL</title> |
| <meta content="PyGreSQL - Python interface for PostgreSQL" name="description" /> |
| <meta content="PyGreSQL, PostGreSQL, Python" name="keywords" /> |
| <link rel="stylesheet" href="docs.css" type="text/css" /> |
| </head> |
| <body> |
| <div class="document" id="pygresql-python-interface-for-postgresql"> |
| <h1 class="title">PyGreSQL - Python interface for PostgreSQL</h1> |
| <h2 class="subtitle" id="pygresql-version-4-0">PyGreSQL version 4.0</h2> |
| <div class="contents topic"> |
| <p class="topic-title first"><a id="contents" name="contents">Contents</a></p> |
| <ul class="simple"> |
| <li><a class="reference" href="#copyright-notice" id="id1" name="id1">Copyright notice</a></li> |
| <li><a class="reference" href="#introduction" id="id2" name="id2">Introduction</a></li> |
| <li><a class="reference" href="#where-to-get" id="id3" name="id3">Where to get ... ?</a><ul> |
| <li><a class="reference" href="#home-sites-of-the-different-packages" id="id4" name="id4">Home sites of the different packages</a></li> |
| <li><a class="reference" href="#download-pygresql-here" id="id5" name="id5">Download PyGreSQL here</a></li> |
| </ul> |
| </li> |
| <li><a class="reference" href="#distribution-files" id="id6" name="id6">Distribution files</a></li> |
| <li><a class="reference" href="#installation" id="id7" name="id7">Installation</a></li> |
| <li><a class="reference" href="#information-and-support" id="id8" name="id8">Information and support</a><ul> |
| <li><a class="reference" href="#for-general-information" id="id9" name="id9">For general information</a></li> |
| <li><a class="reference" href="#for-support" id="id10" name="id10">For support</a></li> |
| <li><a class="reference" href="#pygresql-programming-information" id="id11" name="id11">PyGreSQL programming information</a></li> |
| </ul> |
| </li> |
| <li><a class="reference" href="#changelog-and-future" id="id12" name="id12">ChangeLog and Future</a></li> |
| </ul> |
| </div> |
| <div class="section"> |
| <h1><a class="toc-backref" href="#id1" id="copyright-notice" name="copyright-notice">Copyright notice</a></h1> |
| <p>Written by D'Arcy J.M. Cain (<a class="reference" href="mailto:darcy@druid.net">darcy@druid.net</a>)</p> |
| <p>Based heavily on code written by Pascal Andre (<a class="reference" href="mailto:andre@chimay.via.ecp.fr">andre@chimay.via.ecp.fr</a>)</p> |
| <p>Copyright (c) 1995, Pascal Andre</p> |
| <p>Further modifications copyright (c) 1997-2008 by D'Arcy J.M. Cain |
| (<a class="reference" href="mailto:darcy@druid.net">darcy@druid.net</a>)</p> |
| <p>Permission to use, copy, modify, and distribute this software and its |
| documentation for any purpose, without fee, and without a written agreement |
| is hereby granted, provided that the above copyright notice and this |
| paragraph and the following two paragraphs appear in all copies or in any |
| new file that contains a substantial portion of this file.</p> |
| <p>IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, |
| SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, |
| ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE |
| AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p> |
| <p>THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED |
| TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE |
| AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, |
| ENHANCEMENTS, OR MODIFICATIONS.</p> |
| </div> |
| <div class="section"> |
| <h1><a class="toc-backref" href="#id2" id="introduction" name="introduction">Introduction</a></h1> |
| <p><strong>PostgreSQL</strong> is a highly scalable, SQL compliant, open source |
| object-relational database management system. With more than 15 years |
| of development history, it is quickly becoming the de facto database |
| for enterprise level open source solutions. |
| Best of all, PostgreSQL's source code is available under the most liberal |
| open source license: the BSD license.</p> |
| <p><strong>Python</strong> Python is an interpreted, interactive, object-oriented |
| programming language. It is often compared to Tcl, Perl, Scheme or Java. |
| Python combines remarkable power with very clear syntax. It has modules, |
| classes, exceptions, very high level dynamic data types, and dynamic typing. |
| There are interfaces to many system calls and libraries, as well as to |
| various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules |
| are easily written in C or C++. Python is also usable as an extension |
| language for applications that need a programmable interface. |
| The Python implementation is copyrighted but freely usable and distributable, |
| even for commercial use.</p> |
| <p><strong>PyGreSQL</strong> 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.</p> |
| <p>PyGreSQL is developed and tested on a NetBSD system, but it should also |
| run on most other platforms where PostgreSQL and Python is running. |
| It is based on the PyGres95 code written by Pascal Andre (<a class="reference" href="mailto:andre@chimay.via.ecp.fr">andre@chimay.via.ecp.fr</a>). |
| D'Arcy (<a class="reference" href="mailto:darcy@druid.net">darcy@druid.net</a>) renamed it to PyGreSQL starting with |
| version 2.0 and serves as the "BDFL" of PyGreSQL.</p> |
| <p>The current version PyGreSQL 4.0 needs PostgreSQL 7.2 and Python 2.3 or above.</p> |
| </div> |
| <div class="section"> |
| <h1><a class="toc-backref" href="#id3" id="where-to-get" name="where-to-get">Where to get ... ?</a></h1> |
| <div class="section"> |
| <h2><a class="toc-backref" href="#id4" id="home-sites-of-the-different-packages" name="home-sites-of-the-different-packages">Home sites of the different packages</a></h2> |
| <dl class="docutils"> |
| <dt><strong>Python</strong>:</dt> |
| <dd><a class="reference" href="http://www.python.org">http://www.python.org</a></dd> |
| <dt><strong>PostgreSQL</strong>:</dt> |
| <dd><a class="reference" href="http://www.postgresql.org">http://www.postgresql.org</a></dd> |
| <dt><strong>PyGreSQL</strong>:</dt> |
| <dd><a class="reference" href="http://www.pygresql.org">http://www.pygresql.org</a></dd> |
| </dl> |
| </div> |
| <div class="section"> |
| <h2><a class="toc-backref" href="#id5" id="download-pygresql-here" name="download-pygresql-here">Download PyGreSQL here</a></h2> |
| <dl class="docutils"> |
| <dt>The <strong>released version of the source code</strong> is available at</dt> |
| <dd><ul class="first last simple"> |
| <li><a class="reference" href="ftp://ftp.pygresql.org/pub/distrib/PyGreSQL.tgz">ftp://ftp.pygresql.org/pub/distrib/PyGreSQL.tgz</a></li> |
| </ul> |
| </dd> |
| <dt>You can also check the latest <strong>pre-release version</strong> at</dt> |
| <dd><ul class="first last simple"> |
| <li><a class="reference" href="ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-beta.tgz">ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-beta.tgz</a></li> |
| </ul> |
| </dd> |
| <dt>A <strong>Linux RPM</strong> can be picked up from</dt> |
| <dd><ul class="first last simple"> |
| <li><a class="reference" href="ftp://ftp.pygresql.org/pub/distrib/pygresql.i386.rpm">ftp://ftp.pygresql.org/pub/distrib/pygresql.i386.rpm</a></li> |
| </ul> |
| </dd> |
| <dt>A <strong>NetBSD package</strong> is available in their pkgsrc collection</dt> |
| <dd><ul class="first last simple"> |
| <li><a class="reference" href="ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/databases/py-postgresql/README.html">ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/databases/py-postgresql/README.html</a></li> |
| </ul> |
| </dd> |
| <dt>A <strong>FreeBSD package</strong> is available in their ports collection</dt> |
| <dd><ul class="first last simple"> |
| <li><a class="reference" href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/py-PyGreSQL/">http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/py-PyGreSQL/</a></li> |
| </ul> |
| </dd> |
| <dt>A <strong>Win32 package</strong> for various Python versions is available at</dt> |
| <dd><ul class="first last simple"> |
| <li><a class="reference" href="ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.3.exe">ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.3.exe</a></li> |
| <li><a class="reference" href="ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.4.exe">ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.4.exe</a></li> |
| <li><a class="reference" href="ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.5.exe">ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.5.exe</a></li> |
| <li><a class="reference" href="ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.6.exe">ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-4.0.win32-py2.6.exe</a></li> |
| </ul> |
| </dd> |
| <dt>You can also find PyGreSQL on the <strong>Python Package Index</strong> at</dt> |
| <dd><ul class="first last simple"> |
| <li><a class="reference" href="http://pypi.python.org/pypi/PyGreSQL/">http://pypi.python.org/pypi/PyGreSQL/</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </div> |
| </div> |
| <div class="section"> |
| <h1><a class="toc-backref" href="#id6" id="distribution-files" name="distribution-files">Distribution files</a></h1> |
| <table border="1" class="docutils"> |
| <colgroup> |
| <col width="15%" /> |
| <col width="85%" /> |
| </colgroup> |
| <tbody valign="top"> |
| <tr><td>pgmodule.c</td> |
| <td>the C Python module (_pg)</td> |
| </tr> |
| <tr><td>pg.py</td> |
| <td>the "classic" PyGreSQL module</td> |
| </tr> |
| <tr><td>pgdb.py</td> |
| <td>DB-SIG DB-API 2.0 compliant API wrapper for PygreSQL</td> |
| </tr> |
| <tr><td>docs/</td> |
| <td><p class="first">documentation directory</p> |
| <p>Contains: readme.txt, announce.txt, install.txt, |
| changelog.txt, future.txt, pg.txt and pgdb.txt.</p> |
| <p class="last">All text files are in ReST format, so HTML versions |
| can be easily created with buildhtml.py from docutils.</p> |
| </td> |
| </tr> |
| <tr><td>tutorial/</td> |
| <td><p class="first">demos directory</p> |
| <p>Contains: basics.py, syscat.py, advanced.py and func.py.</p> |
| <p class="last">The samples here have been taken from the |
| PostgreSQL manual and were used for module testing. |
| They demonstrate some PostgreSQL features.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section"> |
| <h1><a class="toc-backref" href="#id7" id="installation" name="installation">Installation</a></h1> |
| <p>You will find the installing instructions in |
| <a class="reference" href="install.html">install.txt</a>.</p> |
| </div> |
| <div class="section"> |
| <h1><a class="toc-backref" href="#id8" id="information-and-support" name="information-and-support">Information and support</a></h1> |
| <div class="section"> |
| <h2><a class="toc-backref" href="#id9" id="for-general-information" name="for-general-information">For general information</a></h2> |
| <dl class="docutils"> |
| <dt><strong>Python</strong>:</dt> |
| <dd><a class="reference" href="http://www.python.org">http://www.python.org</a></dd> |
| <dt><strong>PostgreSQL</strong>:</dt> |
| <dd><a class="reference" href="http://www.postgresql.org">http://www.postgresql.org</a></dd> |
| <dt><strong>PyGreSQL</strong>:</dt> |
| <dd><a class="reference" href="http://www.pygresql.org">http://www.pygresql.org</a></dd> |
| </dl> |
| </div> |
| <div class="section"> |
| <h2><a class="toc-backref" href="#id10" id="for-support" name="for-support">For support</a></h2> |
| <dl class="docutils"> |
| <dt><strong>Python</strong>:</dt> |
| <dd>see <a class="reference" href="http://www.python.org/community/">http://www.python.org/community/</a></dd> |
| <dt><strong>PostgreSQL</strong>:</dt> |
| <dd>see <a class="reference" href="http://www.postgresql.org/support/">http://www.postgresql.org/support/</a></dd> |
| <dt><strong>PyGreSQL</strong>:</dt> |
| <dd><p class="first">Contact the PyGreSQL mailing list |
| concerning PyGreSQL 2.0 and up.</p> |
| <p>If you would like to proposes changes, please join the |
| PyGreSQL mailing list and send context diffs there.</p> |
| <p class="last">See <a class="reference" href="http://mailman.vex.net/mailman/listinfo/pygresql">http://mailman.vex.net/mailman/listinfo/pygresql</a> |
| to join the mailing list.</p> |
| </dd> |
| </dl> |
| <p>Please note that messages to individual developers will generally not be |
| answered directly. All questions, comments and code changes must be |
| submitted to the mailing list for peer review and archiving.</p> |
| </div> |
| <div class="section"> |
| <h2><a class="toc-backref" href="#id11" id="pygresql-programming-information" name="pygresql-programming-information">PyGreSQL programming information</a></h2> |
| <p>You may either choose to use the "classic" PyGreSQL interface |
| provided by the <cite>pg</cite> module or else the newer DB-API 2.0 |
| compliant interface provided by the <cite>pgdb</cite> module.</p> |
| <p><a class="reference" href="http://www.python.org/dev/peps/pep-0249/">DB-API 2.0</a> |
| (Python Database API Specification v2.0) |
| is a specification for connecting to databases (not only PostGreSQL) |
| from Python that has been developed by the Python DB-SIG in 1999.</p> |
| <p>The programming information is available in the files |
| <a class="reference" href="pg.html">pg.txt</a> and <a class="reference" href="pgdb.html">pgdb.txt</a>.</p> |
| <p>Note that PyGreSQL is not thread-safe on the connection level. Therefore |
| we recommend using <cite>DBUtils <http://www.webwareforpython.org/DBUtils></cite> |
| for multi-threaded environments, which supports both PyGreSQL interfaces.</p> |
| </div> |
| </div> |
| <div class="section"> |
| <h1><a class="toc-backref" href="#id12" id="changelog-and-future" name="changelog-and-future">ChangeLog and Future</a></h1> |
| <p>The ChangeLog with past changes is in the file |
| <a class="reference" href="changelog.html">changelog.txt</a>.</p> |
| <p>A to do list and wish list is in the file |
| <a class="reference" href="future.html">future.txt</a>.</p> |
| </div> |
| </div> |
| </body> |
| </html> |