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>
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;