1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Make PQhost return socket path.

This commit is contained in:
Bruce Momjian
2000-11-27 21:12:25 +00:00
parent 6f11e6dffa
commit f6a756e49a

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) if (!conn)
return (char *) NULL; return (char *) NULL;
return conn->pghost; return conn->pghost ? conn->pghost : conn->pgunixsocket;
} }
char * char *