> 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.
In response to
pgsql-general by date
|Next:||From: Tom Lane||Date: 2004-01-31 04:41:12|
|Subject: Re: PostgreSQL 7.4.1 and pgdb.py |
|Previous:||From: Alvaro Herrera||Date: 2004-01-31 03:59:04|
|Subject: Re: PostgreSQL 7.4.1 and pgdb.py|