Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d42d427

Browse files
author
Neil Conway
committed
Slightly rearrange psql startup code so that we read psqlrc before printing
the startup banner. This allows "\set QUIET on" in psqlrc to do what the user probably intended. Patch from Sean Chittenden, editorializing from Neil Conway.
1 parent da67c91 commit d42d427

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/psql/startup.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.101 2004/09/27 19:16:02 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.102 2004/10/06 08:20:58 neilc Exp $
77
*/
88
#include "postgres_fe.h"
99

@@ -280,6 +280,9 @@ main(int argc, char *argv[])
280280
*/
281281
else
282282
{
283+
if (!options.no_psqlrc)
284+
process_psqlrc(argv[0]);
285+
283286
if (!QUIET() && !pset.notty)
284287
{
285288
printf(gettext("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"
@@ -302,8 +305,6 @@ main(int argc, char *argv[])
302305
SetVariable(pset.vars, "PROMPT2", DEFAULT_PROMPT2);
303306
SetVariable(pset.vars, "PROMPT3", DEFAULT_PROMPT3);
304307

305-
if (!options.no_psqlrc)
306-
process_psqlrc(argv[0]);
307308
if (!pset.notty)
308309
initializeInput(options.no_readline ? 0 : 1);
309310
if (options.action_string) /* -f - was used */

0 commit comments

Comments
 (0)