Revert patch so .psqlrc can suppress startup banner:
authorBruce Momjian <bruce@momjian.us>
Sun, 20 Jul 2008 06:08:38 +0000 (06:08 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 20 Jul 2008 06:08:38 +0000 (06:08 +0000)
  In psql, run .psqlrc _after_ printing warnings and banner.

src/bin/psql/startup.c

index f7b75de8efca4fad33a9a60d1ebdfc4a54951a8c..fdf65a55fc21971dd1919caac6b35a2ed47fa79c 100644 (file)
@@ -281,14 +281,12 @@ 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]);
-               /* output newline here because .psqlrc might output something */
+
+               connection_warnings();
                if (!pset.quiet && !pset.notty)
-                       printf("\n");
+                       printf(_("Type \"help\" for help.\n\n"));
                if (!pset.notty)
                        initializeInput(options.no_readline ? 0 : 1);
                if (options.action_string)              /* -f - was used */