diff options
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 74119fd29f0..54566c818f2 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2010, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.214 2010/02/05 03:09:05 joe Exp $ + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.215 2010/02/16 21:07:01 momjian Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -1331,7 +1331,7 @@ do_connect(char *dbname, char *user, char *host, char *port) PQsetNoticeProcessor(n_conn, NoticeProcessor, NULL); pset.db = n_conn; SyncVariables(); - connection_warnings(); /* Must be after SyncVariables */ + connection_warnings(false); /* Must be after SyncVariables */ /* Tell the user about the new connection */ if (!pset.quiet) @@ -1357,7 +1357,7 @@ do_connect(char *dbname, char *user, char *host, char *port) void -connection_warnings(void) +connection_warnings(bool in_startup) { if (!pset.quiet && !pset.notty) { @@ -1383,7 +1383,8 @@ connection_warnings(void) printf(_("%s (%s, server %s)\n"), pset.progname, PG_VERSION, server_version); } - else + /* For version match, only print psql banner on startup. */ + else if (in_startup) printf("%s (%s)\n", pset.progname, PG_VERSION); if (pset.sversion / 100 != client_ver / 100) |