Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2cda889

Browse files
committed
Revert "Add libpq function PQhostaddr()."
This reverts commit9f80f48. Thefunction returned the raw value of a connection parameter, a task servedby PQconninfo(). The next commit will reimplement the psql \conninfochange that way. Back-patch to 9.4, where that commit first appeared.
1 parent816e10d commit2cda889

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
elseif (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
@@ -5340,14 +5340,6 @@ PQhost(const PGconn *conn)
53405340
}
53415341
}
53425342

5343-
char*
5344-
PQhostaddr(constPGconn*conn)
5345-
{
5346-
if (!conn)
5347-
returnNULL;
5348-
returnconn->pghostaddr;
5349-
}
5350-
53515343
char*
53525344
PQport(constPGconn*conn)
53535345
{

‎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
externchar*PQuser(constPGconn*conn);
302302
externchar*PQpass(constPGconn*conn);
303303
externchar*PQhost(constPGconn*conn);
304-
externchar*PQhostaddr(constPGconn*conn);
305304
externchar*PQport(constPGconn*conn);
306305
externchar*PQtty(constPGconn*conn);
307306
externchar*PQoptions(constPGconn*conn);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp