mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
Revert "Add libpq function PQhostaddr()."
This reverts commit 9f80f4835a
. The
function returned the raw value of a connection parameter, a task served
by PQconninfo(). The next commit will reimplement the psql \conninfo
change that way. Back-patch to 9.4, where that commit first appeared.
This commit is contained in:
parent
816e10d800
commit
2cda889984
@ -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>
|
||||
|
@ -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"));
|
||||
|
@ -165,4 +165,3 @@ lo_lseek64 162
|
||||
lo_tell64 163
|
||||
lo_truncate64 164
|
||||
PQconninfo 165
|
||||
PQhostaddr 166
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user