summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29fbb8e)
raw | patch | inline | side by side (parent: 29fbb8e)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 23 Jul 2008 12:29:56 +0000 (14:29 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 24 Jul 2008 12:18:04 +0000 (14:18 +0200) |
If the configured hostname specifies a UNIX domain socket, the parameter now
expands to "localhost" as described earlier.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
expands to "localhost" as described earlier.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index d65a66fd04d0bd8e033c28486c08156588f07c8d..f2d7665ff785a09f92ddfb978b9aa3dd4b7bd84c 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
for (i = 0; i < query->params_num; ++i) {
switch (query->params[i]) {
case C_PSQL_PARAM_HOST:
- params[i] = (NULL == db->host) ? "localhost" : db->host;
+ params[i] = C_PSQL_IS_UNIX_DOMAIN_SOCKET (db->host)
+ ? "localhost" : db->host;
break;
case C_PSQL_PARAM_DB:
params[i] = db->database;