]> granicus.if.org Git - postgresql/commit
Fix bugs in PQhost().
authorFujii Masao <fujii@postgresql.org>
Thu, 23 Jan 2014 14:02:03 +0000 (23:02 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 23 Jan 2014 14:02:03 +0000 (23:02 +0900)
commit996b21cbf24d0ff2ee16c1043fe443ae623474ea
treead63ef50f7808fe5f50d6b6e636a6fec8f46519f
parentf2eede9b584305472dd3fd58e1690766c378ab34
Fix bugs in PQhost().

In the platform that doesn't support Unix-domain socket, when
neither host nor hostaddr are specified, the default host
'localhost' is used to connect to the server and PQhost() must
return that, but it didn't. This patch fixes PQhost() so that
it returns the default host in that case.

Also this patch fixes PQhost() so that it doesn't return
Unix-domain socket directory path in the platform that doesn't
support Unix-domain socket.

Back-patch to all supported versions.
src/interfaces/libpq/fe-connect.c