From: | "MauMau" <maumau307(at)gmail(dot)com> |
---|---|
To: | "Michael Meskes" <meskes(at)postgresql(dot)org> |
Cc: | "Michael Meskes" <meskes(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [bug fix] connection service file doesn't take effect with ECPG apps |
Date: | 2013-12-28 20:35:22 |
Message-ID: | FBCA4ED9D6D6415DAAC7B31F19C0BCA9@maumau |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: "Michael Meskes" <meskes(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2013-12-28 20:36:20 | Re: [PATCH] Regression tests in windows ignore white space |
Previous Message | Alexander Korotkov | 2013-12-28 15:51:01 | Re: PoC: Partial sort |