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;