]> granicus.if.org Git - postgresql/commitdiff
In psql, run .psqlrc _after_ printing warnings and banner.
authorBruce Momjian <bruce@momjian.us>
Fri, 18 Jul 2008 17:19:55 +0000 (17:19 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 18 Jul 2008 17:19:55 +0000 (17:19 +0000)
src/bin/psql/startup.c

index 8f249e90570d8f05e8c527df8958865811d24a68..bb82dfb5c4b7e671d296c0998182f63adb110218 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2008, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.149 2008/07/01 00:08:18 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.150 2008/07/18 17:19:55 momjian Exp $
  */
 #include "postgres_fe.h"
 
@@ -281,12 +281,14 @@ main(int argc, char *argv[])
         */
        else
        {
+               connection_warnings();
+               if (!pset.quiet && !pset.notty)
+                       printf(_("Type \"help\" for help.\n"));
                if (!options.no_psqlrc)
                        process_psqlrc(argv[0]);
-
-               connection_warnings();
+               /* output newline here because .psqlrc might output something */
                if (!pset.quiet && !pset.notty)
-                       printf(_("Type \"help\" for help.\n\n"));
+                       printf("\n");
                if (!pset.notty)
                        initializeInput(options.no_readline ? 0 : 1);
                if (options.action_string)              /* -f - was used */