[DB-SIG] pypg pure Python db driver for Postgresql

Stephane Bortzmeyer bortzmeyer at nic.fr
Tue Jul 12 10:52:53 CEST 2005


On Mon, Jul 11, 2005 at 10:59:55PM -0500,
 Randall Smith <randall at tnr.cc> wrote 
 a message of 32 lines which said:

> I replaced the C portion of PyGreSQL to form a Python driver I'm
> calling pypg.  You can download it from the location below.

I was planning to test its performance, using the test we developed to
compare psycopg and PoPy, but it always fail (do note that I was
trying to use the local connection, "host" is empty, but if I specify
"host=localhost", I get the same error):

Traceback (most recent call last):
  File "test.py", line 110, in ?
    connection = db_module.connect("dbname=db-comp-registry")
  File "/usr/local/lib/python2.3/site-packages/pypg/pgdb2.py", line 413, in connect
    dbtty, dbuser, dbpasswd)
  File "/usr/local/lib/python2.3/site-packages/pypg/_mypg.py", line 175, in connect
    return Connection(dbhost, dbport, dbbase, dbuser, dbpasswd)
  File "/usr/local/lib/python2.3/site-packages/pypg/_mypg.py", line 58, in __init__
    self.connect()
  File "/usr/local/lib/python2.3/site-packages/pypg/_mypg.py", line 62, in connect
    sock.connect((self.host, self.port))
  File "<string>", line 1, in connect
socket.gaierror: (-2, 'Name or service not known')


More information about the DB-SIG mailing list