aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-10-06 08:20:58 +0000
committerNeil Conway <neilc@samurai.com>2004-10-06 08:20:58 +0000
commitd42d4272524f643ee6da2836749a37370928b3ad (patch)
tree03bb3f0d351d5e38b1a202c6eadeb3c34135b98f /src
parentda67c919d9f16f9dda6be0198daa8a741ca6d3b1 (diff)
downloadpostgresql-d42d4272524f643ee6da2836749a37370928b3ad.tar.gz
postgresql-d42d4272524f643ee6da2836749a37370928b3ad.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/startup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c
index e0aea1d3eb4..01aba011b2e 100644
--- a/src/bin/psql/startup.c
+++ b/src/bin/psql/startup.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.101 2004/09/27 19:16:02 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.102 2004/10/06 08:20:58 neilc Exp $
*/
#include "postgres_fe.h"
@@ -280,6 +280,9 @@ main(int argc, char *argv[])
*/
else
{
+ if (!options.no_psqlrc)
+ process_psqlrc(argv[0]);
+
if (!QUIET() && !pset.notty)
{
printf(gettext("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"
@@ -302,8 +305,6 @@ main(int argc, char *argv[])
SetVariable(pset.vars, "PROMPT2", DEFAULT_PROMPT2);
SetVariable(pset.vars, "PROMPT3", DEFAULT_PROMPT3);
- if (!options.no_psqlrc)
- process_psqlrc(argv[0]);
if (!pset.notty)
initializeInput(options.no_readline ? 0 : 1);
if (options.action_string) /* -f - was used */