Thread: Python connection

Python connection

From
Michael Satterwhite
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Consider the following snippet from a Python module:
from pyPGSQL import libpq
cn = libpq.PQconnectdb("dbname='db', host='xxx'")

At this point, I get the error:
invalid connection option ", host

If I'm reading the documentation for libpq correctly (it's safe to assume I'm
not), host appears to be the correct parameter for specifying the server
running PostgreSQL. What am I doing wrong
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQFAi+eCjeziQOokQnARAuYUAKCF5WHowC0tlto0IlAhcFpRtranjgCdEUzN
1tjHjkmE8CrSf/6tS2CwoSM=
=Fntg
-----END PGP SIGNATURE-----



Re: Python connection

From
Karsten Hilbert
Date:
a) this is the wrong mailing list for your question
b) obviously, it doesn't like the "," part (and possibly the  "host" part but that remains to be seen), try separating
by ":" or just space or whatever libpq docs say
 
c) any particular reason you don't use the Python DB API ?

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346