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

Commit8ceb68b

Browse files
committed
Have \conninfo mention the port even for local sockets.
Per discussion with David Christensen, there can be multipleinstances of PG accessible via local sockets, and you need the portto see which one you're actually connected to. David's originalpatch worked this way, but I inadvertently ripped it out duringcommit.
1 parent013ed0b commit8ceb68b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/psql/command.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.222 2010/07/2003:54:19 rhaas Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.223 2010/07/2014:14:30 rhaas Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"command.h"
@@ -306,8 +306,8 @@ exec_command(const char *cmd,
306306
printf("You are connected to database \"%s\" on host \"%s\" at port \"%s\" as user \"%s\".\n",
307307
db,host,PQport(pset.db),PQuser(pset.db));
308308
else
309-
printf("You are connected to database \"%s\" via local socket as user \"%s\".\n",
310-
db,PQuser(pset.db));
309+
printf("You are connected to database \"%s\" via local socketat port \"%s\"as user \"%s\".\n",
310+
db,PQport(pset.db),PQuser(pset.db));
311311
}
312312

313313
/* \copy */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp