I am trying to connect to postgres database on my local machine

The connect strings reads

CONNECTION "dbname=castle user=dave password=foobar host=localhost port=5432"

This gives an msPOSTGISLAyerOpen(): Query error, the reported error is "unknown hostname: localhost"

Doing a nslookup on localhost gives the expected answer off 127.0.0.1

Using the value 127.0.0.1 instead of the string localhost, gives the same error, but reporting the error unknown host name 127.0.0.1

A telnet session to localhost 5432 connects , therefore the database is running on localhost, I am not having any problems resolving names.

A psql session to the database castle with the login dave and the password foobar works correctly


SO why the error, any suggestions ?

Dave.
begin:vcard
fn:David Potts
n:Potts;David
x-mozilla-html:FALSE
version:2.1
end:vcard

Reply via email to