Make PQhost return socket path.

This commit is contained in:
Bruce Momjian 2000-11-27 21:12:25 +00:00
parent 6f11e6dffa
commit f6a756e49a
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.148 2000/11/17 04:22:52 ishii Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.149 2000/11/27 21:12:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -2616,7 +2616,7 @@ PQhost(const PGconn *conn)
{
if (!conn)
return (char *) NULL;
return conn->pghost;
return conn->pghost ? conn->pghost : conn->pgunixsocket;
}
char *