3
3
*
4
4
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
5
5
*
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 $
7
7
*/
8
8
#include "postgres_fe.h"
9
9
#include "command.h"
@@ -1331,7 +1331,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
1331
1331
PQsetNoticeProcessor (n_conn , NoticeProcessor , NULL );
1332
1332
pset .db = n_conn ;
1333
1333
SyncVariables ();
1334
- connection_warnings (); /* Must be after SyncVariables */
1334
+ connection_warnings (false ); /* Must be after SyncVariables */
1335
1335
1336
1336
/* Tell the user about the new connection */
1337
1337
if (!pset .quiet )
@@ -1357,7 +1357,7 @@ do_connect(char *dbname, char *user, char *host, char *port)
1357
1357
1358
1358
1359
1359
void
1360
- connection_warnings (void )
1360
+ connection_warnings (bool in_startup )
1361
1361
{
1362
1362
if (!pset .quiet && !pset .notty )
1363
1363
{
@@ -1383,7 +1383,8 @@ connection_warnings(void)
1383
1383
printf (_ ("%s (%s, server %s)\n" ),
1384
1384
pset .progname , PG_VERSION , server_version );
1385
1385
}
1386
- else
1386
+ /* For version match, only print psql banner on startup. */
1387
+ else if (in_startup )
1387
1388
printf ("%s (%s)\n" , pset .progname , PG_VERSION );
1388
1389
1389
1390
if (pset .sversion / 100 != client_ver / 100 )
0 commit comments