diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index e23e91d9bb34021461ab7c51f6dad1b3674998e7..d829a4b9d550b9d759db2540d6c37db26a441b43 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1467,24 +1467,6 @@ char *PQhost(const PGconn *conn); </listitem> </varlistentry> - <varlistentry id="libpq-pqhostaddr"> - <term> - <function>PQhostaddr</function> - <indexterm> - <primary>PQhostaddr</primary> - </indexterm> - </term> - - <listitem> - <para> - Returns the server numeric IP address of the connection. -<synopsis> -char *PQhostaddr(const PGconn *conn); -</synopsis> - </para> - </listitem> - </varlistentry> - <varlistentry id="libpq-pqport"> <term> <function>PQport</function> diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 62ea0440efad393b512c483de47fe12b8d74226b..eb281a3dcbce50f251cd4184078f4c98b9105f92 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -302,7 +302,7 @@ exec_command(const char *cmd, else if (strcmp(cmd, "conninfo") == 0) { char *db = PQdb(pset.db); - char *host = (PQhostaddr(pset.db) != NULL) ? PQhostaddr(pset.db) : PQhost(pset.db); + char *host = PQhost(pset.db); if (db == NULL) printf(_("You are currently not connected to a database.\n")); diff --git a/src/interfaces/libpq/exports.txt b/src/interfaces/libpq/exports.txt index cbb6e36c119d8bc178ff42ddfb3c57243c6ec54f..93da50df31143713f38537fbe667e5d7fe48fc94 100644 --- a/src/interfaces/libpq/exports.txt +++ b/src/interfaces/libpq/exports.txt @@ -165,4 +165,3 @@ lo_lseek64 162 lo_tell64 163 lo_truncate64 164 PQconninfo 165 -PQhostaddr 166 diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 703cbac37ae791e9adb7c55ba045d272888bc62c..3af222b5a0924acb3959bffb1af5a04c3edea94f 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -5340,14 +5340,6 @@ PQhost(const PGconn *conn) } } -char * -PQhostaddr(const PGconn *conn) -{ - if (!conn) - return NULL; - return conn->pghostaddr; -} - char * PQport(const PGconn *conn) { diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h index 80591728a0fe85d6ec3ba055c6890ce5e0acf271..b81dc16285f59ab60286cafefc532195a73635b2 100644 --- a/src/interfaces/libpq/libpq-fe.h +++ b/src/interfaces/libpq/libpq-fe.h @@ -301,7 +301,6 @@ extern char *PQdb(const PGconn *conn); extern char *PQuser(const PGconn *conn); extern char *PQpass(const PGconn *conn); extern char *PQhost(const PGconn *conn); -extern char *PQhostaddr(const PGconn *conn); extern char *PQport(const PGconn *conn); extern char *PQtty(const PGconn *conn); extern char *PQoptions(const PGconn *conn);