Re: [bug fix] connection service file doesn't take effect with ECPG apps
| От | MauMau |
|---|---|
| Тема | Re: [bug fix] connection service file doesn't take effect with ECPG apps |
| Дата | |
| Msg-id | FBCA4ED9D6D6415DAAC7B31F19C0BCA9@maumau обсуждение исходный текст |
| Ответ на | Re: [bug fix] connection service file doesn't take effect with ECPG apps (Michael Meskes <meskes@postgresql.org>) |
| Ответы |
Re: [bug fix] connection service file doesn't take effect
with ECPG apps
|
| Список | pgsql-hackers |
From: "Michael Meskes" <meskes@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
В списке pgsql-hackers по дате отправления: