From ba0f9ff3bac5205687f172d9e9a846b42ce34d3d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 13 Jun 2004 19:56:52 +0000 Subject: Code review for recently-added network functions. Get it to work when log_hostname is enabled, clean up documentation. --- doc/src/sgml/func.sgml | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index a5d81b6fddc..ecf344453f8 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -6609,25 +6609,25 @@ SELECT NULLIF(value, '(none)') ... - inet_client_addr + inet_client_addr() inet address of the remote connection - inet_client_port + inet_client_port() int4 port of the remote connection - inet_server_addr + inet_server_addr() inet address of the local connection - inet_server_port + inet_server_port() int4 port of the local connection @@ -6687,17 +6687,6 @@ SELECT NULLIF(value, '(none)') ... - - inet_client_addr and - inet_server_addr return the IPv4 or IPv6 (if - configured) address of the remote or local host connecting to the - database, respectively. inet_client_port - and inet_server_port return the port number - of the remote or local host connecting to the database, - respectively. If the connection is not a network connection, - these functions will return NULL. - - current_schema returns the name of the schema that is at the front of the search path (or a null value if the search path is @@ -6718,6 +6707,33 @@ SET search_path TO schema , schema, .. + + inet_client_addr + + + + inet_client_port + + + + inet_server_addr + + + + inet_server_port + + + + inet_client_addr returns the IP address of the + current client, and inet_client_port returns the + port number. + inet_server_addr returns the IP address on which + the server accepted the current connection, and + inet_server_port returns the port number. + All these functions return NULL if the connection is via a Unix-domain + socket. + + version -- cgit v1.2.3