]> granicus.if.org Git - postgresql/commitdiff
Also process psqlrc when running psql -l
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 16 Feb 2011 21:14:38 +0000 (23:14 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 16 Feb 2011 21:15:54 +0000 (23:15 +0200)
This was previously not very useful, but with many people customizing
the linestyle, it is nice for a consistent appearance.

src/bin/psql/startup.c

index 4f3815a28a89a6d7c9a2b6ab6a1b277541fcce20..10713e9b15d6d5757410f75647caeaa363e51c1c 100644 (file)
@@ -224,8 +224,12 @@ main(int argc, char *argv[])
 
        if (options.action == ACT_LIST_DB)
        {
-               int                     success = listAllDbs(false);
+               int                     success;
 
+               if (!options.no_psqlrc)
+                       process_psqlrc(argv[0]);
+
+               success = listAllDbs(false);
                PQfinish(pset.db);
                exit(success ? EXIT_SUCCESS : EXIT_FAILURE);
        }