pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: libpq: PQhost to return active connected host or hostaddr 2+ messages / 2 participants [nested] [flat]
* pgsql: libpq: PQhost to return active connected host or hostaddr @ 2018-03-27 16:34 Peter Eisentraut <peter_e@gmx.net> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2018-03-27 16:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org libpq: PQhost to return active connected host or hostaddr Previously, PQhost didn't return the connected host details when the connection type was CHT_HOST_ADDRESS (i.e., via hostaddr). Instead, it returned the complete host connection parameter (which could contain multiple hosts) or the default host details, which was confusing and arguably incorrect. Change this to return the actually connected host or hostaddr irrespective of the connection type. When hostaddr but no host was specified, hostaddr is now returned. Never return the original host connection parameter, and document that PQhost cannot be relied on before the connection is established. PQport is similarly changed to always return the active connection port and never the original connection parameter. Author: Hari Babu <kommi.haribabu@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> Reviewed-by: David G. Johnston <david.g.johnston@gmail.com> Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1944cdc98273dbb8439ad9b387ca2858531afcf0 Modified Files -------------- doc/src/sgml/libpq.sgml | 48 +++++++++++++++++++++++++++++++++++++-- src/interfaces/libpq/fe-connect.c | 25 ++++++++++---------- 2 files changed, 59 insertions(+), 14 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: libpq: PQhost to return active connected host or hostaddr @ 2018-08-03 16:21 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2018-08-03 16:21 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org libpq: PQhost to return active connected host or hostaddr Previously, PQhost didn't return the connected host details when the connection type was CHT_HOST_ADDRESS (i.e., via hostaddr). Instead, it returned the complete host connection parameter (which could contain multiple hosts) or the default host details, which was confusing and arguably incorrect. Change this to return the actually connected host or hostaddr irrespective of the connection type. When hostaddr but no host was specified, hostaddr is now returned. Never return the original host connection parameter, and document that PQhost cannot be relied on before the connection is established. PQport is similarly changed to always return the active connection port and never the original connection parameter. Back-patch of commit 1944cdc98273dbb8439ad9b387ca2858531afcf0 into the v10 branch. Author: Hari Babu <kommi.haribabu@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> Reviewed-by: David G. Johnston <david.g.johnston@gmail.com> Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/62038810b73dbb78c66c28a24642b0e066e0b1a1 Modified Files -------------- doc/src/sgml/libpq.sgml | 48 +++++++++++++++++++++++++++++++++++++-- src/interfaces/libpq/fe-connect.c | 25 ++++++++++---------- 2 files changed, 59 insertions(+), 14 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-08-03 16:21 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-03-27 16:34 pgsql: libpq: PQhost to return active connected host or hostaddr Peter Eisentraut <peter_e@gmx.net> 2018-08-03 16:21 pgsql: libpq: PQhost to return active connected host or hostaddr Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox