]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Temporary fix for the problem that pg_stat_activity, inet_client_addr(),
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 May 2007 23:31:59 +0000 (23:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 May 2007 23:31:59 +0000 (23:31 +0000)
commit2f6d85101b6720edef691e854216a266966c44ba
tree9c7be9b8caaed6e09356cb1e697790452a0e0da5
parentd42e2b75027c4ea4c8140d7734a6e751ec155b6c
Temporary fix for the problem that pg_stat_activity, inet_client_addr(),
and inet_server_addr() fail if the client connected over a "scoped" IPv6
address.  In this case getnameinfo() will return a string ending with
a poorly-standardized "%something" zone specifier, which these functions
try to feed to network_in(), which won't take it.  So that we don't lose
functionality altogether, suppress the zone specifier before giving the
string to network_in().  Per report from Brian Hirt.

TODO: probably someday the inet type should support scoped IPv6 addresses,
and then this patch should be reverted.

Backpatch to 8.2 ... is it worth going further?
src/backend/utils/adt/network.c
src/backend/utils/adt/pgstatfuncs.c
src/include/utils/builtins.h