From: "Michael Meskes" <mes...@postgresql.org>
Or in other words, I used the connect command you had in your email with a
services file pointing to a local database and it connected to that database. Instead of adding an additional output I checked the log output which suggested
that host was NULL.

Your test case seems different from my original mail. In my test case, I want to connect to a database on another machine, not on the local one. For example:

1. The ECPG app runs on a machine called client-host.
2. The database server to connect to runs on a machine called server-host.
3. There's no database server running on client-host.
4. The ECPG app uses the connection service file whose contents is:
[my_service]
host=server-host
... other necessary parameters like port, dbname, etc.

The app mistakenly tries to connect to the database server on the local machine (client-host), instead of the desired server-host, and fails to connect because the database server is not running on client-host. This is because ECPGconnect() passes an empty string (""), not NULL, to PQconnectdbParams().

Regards
MauMau






--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to