Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL 7.4.1 and pgdb.py

From: Jeff Davis <jdavis-pgsql(at)empires(dot)org>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Manuel Tejada <mantemu(at)terra(dot)com(dot)pe>,PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL 7.4.1 and pgdb.py
Date: 2004-01-31 04:11:28
Message-ID: 1075522288.21383.16.camel@jeff (view raw or flat)
Thread:
Lists: 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


In response to

pgsql-general by date

Next:From: Tom LaneDate: 2004-01-31 04:41:12
Subject: Re: PostgreSQL 7.4.1 and pgdb.py
Previous:From: Alvaro HerreraDate: 2004-01-31 03:59:04
Subject: Re: PostgreSQL 7.4.1 and pgdb.py

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group