Re: PostgreSQL 7.4.1 and pgdb.py - Mailing list pgsql-general

From Jeff Davis
Subject Re: PostgreSQL 7.4.1 and pgdb.py
Date
Msg-id 1075522288.21383.16.camel@jeff
Whole thread Raw
In response to Re: PostgreSQL 7.4.1 and pgdb.py  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
> Keep in mind that there's also psycopg and PyGreSql, as far as Python
> interfaces go.

pg.py and pgdb.py are both part of PyGreSQL. pg.py is the more low-level
interface, closer to a wrapper of libpq (but with lots of helper
functions to make it natural to use in python), and pgdb.py is
PyGreSQL's DBAPI-2.0-compliant interface, which is compatible with other
interfaces in python (so you could swap out another DB for PostgreSQL
without code changes, ideally).

pgdb.py, in compliance with the DBAPI-2.0 spec, does things like match
data types up by using the system catalogs (so you don't have to convert
from text) and has even more features to make it even more natural to
use with python. However, with each version change, pgdb.py needs to be
updated to match the current version of the postgres catalogs, which is
the problem the poster ran into. I think it's supposed to be similar to
JDBC in some respects.

I usually use pg.py, so I might have some details wrong about pgdb.py.

Regards,
    Jeff Davis


pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL 7.4.1 and pgdb.py
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL 7.4.1 and pgdb.py