|
From: Ian B. <ia...@co...> - 2003-06-05 03:55:12
|
On Wed, 2003-06-04 at 22:42, xtian wrote: > It looks like the PostGreSQL support for SQLObject expects psycopg - is > there any particular reason for this? I'm doing development on Windows > (although we'll eventually be deploying on Linux), and I don't think I > can go through the compilation process required for psycopg. (Unless > anyone has some compiled binaries for windows/Python2.2 lying around?) > > It doesn't look like it would take much to make PostgresConnection use > PyPgSQL.PgSQL (which has binaries for windows), although I haven't > looked closely. Are there any nasty gotchas I should know about? Have > braver men tried and failed? I chose psycopg because it was there -- I'm not up enough on Postgres to know what drivers are best, though psycopg seems to be one of the more actively maintained. I think it should be easy enough to use a different driver. I don't know if cursor.lastoid() is standard across the various Postgres drivers, otherwise I don't believe there's anything else that's not simple DBAPI. Try doing import pypgsql as psycopg at the top of DBConnection, and maybe run the test: python tests/test.py -dpostgres (For the testing environment you'll have to set up a database "test", like "createdb test") |