Skip to content

Commit 27b6f9c

Browse files
committed
Revert "Add libpq function PQhostaddr()."
This reverts commit 9f80f48. 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.
1 parent 866c6ab commit 27b6f9c

File tree

5 files changed

+1
-29
lines changed

5 files changed

+1
-29
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,24 +1467,6 @@ char *PQhost(const PGconn *conn);
14671467
</listitem>
14681468
</varlistentry>
14691469

1470-
<varlistentry id="libpq-pqhostaddr">
1471-
<term>
1472-
<function>PQhostaddr</function>
1473-
<indexterm>
1474-
<primary>PQhostaddr</primary>
1475-
</indexterm>
1476-
</term>
1477-
1478-
<listitem>
1479-
<para>
1480-
Returns the server numeric IP address of the connection.
1481-
<synopsis>
1482-
char *PQhostaddr(const PGconn *conn);
1483-
</synopsis>
1484-
</para>
1485-
</listitem>
1486-
</varlistentry>
1487-
14881470
<varlistentry id="libpq-pqport">
14891471
<term>
14901472
<function>PQport</function>

src/bin/psql/command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ exec_command(const char *cmd,
302302
else if (strcmp(cmd, "conninfo") == 0)
303303
{
304304
char *db = PQdb(pset.db);
305-
char *host = (PQhostaddr(pset.db) != NULL) ? PQhostaddr(pset.db) : PQhost(pset.db);
305+
char *host = PQhost(pset.db);
306306

307307
if (db == NULL)
308308
printf(_("You are currently not connected to a database.\n"));

src/interfaces/libpq/exports.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,3 @@ lo_lseek64 162
165165
lo_tell64 163
166166
lo_truncate64 164
167167
PQconninfo 165
168-
PQhostaddr 166

src/interfaces/libpq/fe-connect.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5339,14 +5339,6 @@ PQhost(const PGconn *conn)
53395339
}
53405340
}
53415341

5342-
char *
5343-
PQhostaddr(const PGconn *conn)
5344-
{
5345-
if (!conn)
5346-
return NULL;
5347-
return conn->pghostaddr;
5348-
}
5349-
53505342
char *
53515343
PQport(const PGconn *conn)
53525344
{

src/interfaces/libpq/libpq-fe.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ extern char *PQdb(const PGconn *conn);
301301
extern char *PQuser(const PGconn *conn);
302302
extern char *PQpass(const PGconn *conn);
303303
extern char *PQhost(const PGconn *conn);
304-
extern char *PQhostaddr(const PGconn *conn);
305304
extern char *PQport(const PGconn *conn);
306305
extern char *PQtty(const PGconn *conn);
307306
extern char *PQoptions(const PGconn *conn);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy