From c3613d4526ba04fb18011e2af1923b9a167effec Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Mon, 28 Aug 2017 13:28:05 +0800 Subject: [PATCH v2] Show sockdir/hostname in pg_regress startup output --- src/test/regress/pg_regress.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index abb742b..4cccefc 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -2438,8 +2438,10 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc #else #define ULONGPID(x) (unsigned long) (x) #endif - printf(_("running on port %d with PID %lu\n"), - port, ULONGPID(postmaster_pid)); + printf(_("running with PID %lu; connect with:\n"), + ULONGPID(postmaster_pid)); + printf(gettext_noop(" psql \"host='%s' port=%d dbname='%s'\"\n"), + hostname ? hostname : sockdir, port, dblist->str); } else { -- 2.9.5