can't connect to postgresql using pygresql

rdack rdacker at pacbell.net
Tue Sep 11 22:24:26 CEST 2001


rdacker at pacbell.net (rdack) wrote in message news:<644f6688.0109110958.284cc26d at posting.google.com>...
> using pygresql-3.2, postgresql-7.1.3, mac os x 10.0?, g4
> 
> i can import _pg, but get error on connect:
> >>>db=_pg.connect('tt1', 'localhost')
> _pg.error: PQconnectPoll() -- connect() failed: Connection refused
>         Is the postmaster running (with -i) at 'localhost'
>         and accepting connections on TCP/IP port 5432?
> 
> port# problem? how do i determine what port postgresql is waiting on?
> could it be a path problem? i can run psql and see my db from the
> directory python is running from.
> 
> anything else i could check?

that is the default port for postgresql. 
i tried:
>>>db=_pg.connect('tt1')

and that worked. whew!
it didn't like 'localhost'?



More information about the Python-list mailing list