Postgresql - Preferred Python Library

Cliff Wells clifford.wells at comcast.net
Sat Sep 11 05:32:30 EDT 2004


On Fri, 2004-09-10 at 23:04 -0700, Tim Roberts wrote:
> Cliff Wells <clifford.wells at comcast.net> wrote:
> >On Thu, 2004-09-09 at 16:21, Graeme Matthew wrote:
> >> 
> >> I have noticed that there are a numbe rof client libraries for connecting to 
> >> Postgres.
> >> 
> >> Can anyone tell me what is the recommended Python library for database 
> >> connections
> >
> >I'd strongly recommend psycopg.  I've used both psycopg and the pgsql
> >module and found psycopg to be much more stable. 
> 
> So have I, and I wish I could quantify the difference.  It's not like
> pyPgSQL crashes on me every day, but there's something intangible about
> psycopg that appeals to me.  I've switched to it everywhere.

My tangible difference was that a script I have that inserts about
40,000 records into a table (as a single transaction) could never
complete (hard crash) with the standard pgsql module but completes
without a hitch with psycopg.  Other than that I don't have a problem
with it <wink>.

Cliff

-- 
Cliff Wells <clifford.wells at comcast.net>




More information about the Python-list mailing list