33 *
44 * Copyright (c) 2000-2010, PostgreSQL Global Development Group
55 *
6- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.214 2010/02/05 03:09:05 joe Exp $
6+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.215 2010/02/16 21:07:01 momjian Exp $
77 */
88#include "postgres_fe.h"
99#include "command.h"
@@ -1331,7 +1331,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
13311331 PQsetNoticeProcessor (n_conn , NoticeProcessor , NULL );
13321332 pset .db = n_conn ;
13331333 SyncVariables ();
1334- connection_warnings (); /* Must be after SyncVariables */
1334+ connection_warnings (false ); /* Must be after SyncVariables */
13351335
13361336 /* Tell the user about the new connection */
13371337 if (!pset .quiet )
@@ -1357,7 +1357,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
13571357
13581358
13591359void
1360- connection_warnings (void )
1360+ connection_warnings (bool in_startup )
13611361{
13621362 if (!pset .quiet && !pset .notty )
13631363 {
@@ -1383,7 +1383,8 @@ connection_warnings(void)
13831383 printf (_ ("%s (%s, server %s)\n" ),
13841384 pset .progname , PG_VERSION , server_version );
13851385 }
1386- else
1386+ /* For version match, only print psql banner on startup. */
1387+ else if (in_startup )
13871388 printf ("%s (%s)\n" , pset .progname , PG_VERSION );
13881389
13891390 if (pset .sversion / 100 != client_ver / 100 )
0 commit comments