summaryrefslogtreecommitdiff
path: root/src/include/utils/builtins.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-05-17 23:31:59 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-05-17 23:31:59 +0000
commit2f6d85101b6720edef691e854216a266966c44ba (patch)
tree9c7be9b8caaed6e09356cb1e697790452a0e0da5 /src/include/utils/builtins.h
parentd42e2b75027c4ea4c8140d7734a6e751ec155b6c (diff)
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?
Diffstat (limited to 'src/include/utils/builtins.h')
-rw-r--r--src/include/utils/builtins.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 173339683af..0bf051576cc 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.282.2.1 2007/01/03 22:39:35 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.282.2.2 2007/05/17 23:31:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -767,6 +767,7 @@ extern Datum inetor(PG_FUNCTION_ARGS);
extern Datum inetpl(PG_FUNCTION_ARGS);
extern Datum inetmi_int8(PG_FUNCTION_ARGS);
extern Datum inetmi(PG_FUNCTION_ARGS);
+extern void clean_ipv6_addr(int addr_family, char *addr);
/* mac.c */
extern Datum macaddr_in(PG_FUNCTION_ARGS);