Re: PostgreSQL 7.4.1 and pgdb.py
От | Jeff Davis |
---|---|
Тема | Re: PostgreSQL 7.4.1 and pgdb.py |
Дата | |
Msg-id | 1075522288.21383.16.camel@jeff обсуждение исходный текст |
Ответ на | Re: PostgreSQL 7.4.1 and pgdb.py (Alvaro Herrera <alvherre@dcc.uchile.cl>) |
Список | 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 по дате отправления: