[DB-SIG] pypg pure Python db driver for Postgresql
Marcos Sánchez Provencio
marcos at burke.ath.cx
Tue Jul 12 14:19:27 CEST 2005
Usually, in PostgreSQL, no host means Unix socket, not localhost. Some
clients can not handle unix sockets.
El mar, 12-07-2005 a las 10:52 +0200, Stephane Bortzmeyer escribió:
> 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')
> _______________________________________________
> DB-SIG maillist - DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig
--
Marcos Sánchez Provencio <marcos at burke.ath.cx>
More information about the DB-SIG
mailing list