postgresql 9.2 - pgdb.connect() causes segmentation error in python 2.7.3 -
i compiled , installed instance of postgres 9.2.1. , python 2.7.3. on opensuse 12.2, running on xeon server. downloaded pygresql , tried connect database using pgdb crashes python. here trace:
retrieving package pygresql-4.0-200.1.2.x86_64 (1/1), 85.0 kib (402.1 kib unpacked) retrieving: pygresql-4.0-200.1.2.x86_64.rpm ........................................................[done] installing: pygresql-4.0-200.1.2 ...................................................................[done] rikki:~/downloads # python python 2.7.3 (default, apr 14 2012, 08:58:41) [gcc] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import pgdb >>> c=pgdb.connect() segmentation fault
using "" or localhost or works "ok".
rikki:~/downloads # python python 2.7.3 (default, apr 14 2012, 08:58:41) [gcc] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import pgdb >>> d=pgdb.connect(host="localhost") segmentation fault rikki:~/downloads # python python 2.7.3 (default, apr 14 2012, 08:58:41) [gcc] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import pgdb >>> d=pgdb.connect(host="zzzzzzzzzzzzzzz") traceback (most recent call last): file "<stdin>", line 1, in <module> file "/usr/lib64/python2.7/site-packages/pgdb.py", line 482, in connect dbtty, dbuser, dbpasswd) pg.internalerror: not translate host name "zzzzzzzzzzzzzzz" address: name or service not known >>>
the database accessible: rikki:~/downloads # psql -u cw psql (9.2.2) type "help" help.
cw=# select now(); ------------------------------ 2013-05-14 09:08:49.54825-07 (1 row) cw=#
at same time have desktop similar installation works fine.
what should checking in installation?
thanks.
--edit-- trying psycopg2-2.5-py2.7
gives same kinds of error:
>>> con=psycopg2.connect(host="z",db="cw",user="cw") traceback (most recent call last): file "<stdin>", line 1, in <module> file "/usr/local/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) psycopg2.operationalerror: invalid connection option "db" >>> con=psycopg2.connect(host="localhost",database="cw",user="cw") segmentation fault
Comments
Post a Comment