This reverts commit
9f80f4835a55a1cbffcda5d23a617917f3286c14. 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.
</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>
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"));
lo_tell64 163
lo_truncate64 164
PQconninfo 165
-PQhostaddr 166
}
}
-char *
-PQhostaddr(const PGconn *conn)
-{
- if (!conn)
- return NULL;
- return conn->pghostaddr;
-}
-
char *
PQport(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);