]> granicus.if.org Git - postgresql/commitdiff
psql: allow \pset C in setting the title, matches \C
authorBruce Momjian <bruce@momjian.us>
Tue, 6 Oct 2015 00:56:38 +0000 (20:56 -0400)
committerBruce Momjian <bruce@momjian.us>
Tue, 6 Oct 2015 00:56:38 +0000 (20:56 -0400)
Report by David G. Johnston

doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/command.c

index f5c9552ed10321e9828890493bca424a71770cea..212dbfa154c595222b2f8a0d85f724e0433fe5a5 100644 (file)
@@ -2336,7 +2336,7 @@ lo_import 152801
           </varlistentry>
 
           <varlistentry>
-          <term><literal>title</literal></term>
+          <term><literal>title</literal> (or <literal>C</literal>)</term>
           <listitem>
           <para>
           Sets the table title for any subsequently printed tables. This
index 8156b763e921310fc511b8ff7c03bfdd63083693..5163c765bae89e985a85e58f2c98d393cbbbca26 100644 (file)
@@ -2637,7 +2637,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
        }
 
        /* set title override */
-       else if (strcmp(param, "title") == 0)
+       else if (strcmp(param, "C") == 0 || strcmp(param, "title") == 0)
        {
                free(popt->title);
                if (!value)
@@ -2837,7 +2837,7 @@ printPsetInfo(const char *param, struct printQueryOpt *popt)
        }
 
        /* show title override */
-       else if (strcmp(param, "title") == 0)
+       else if (strcmp(param, "C") == 0 || strcmp(param, "title") == 0)
        {
                if (popt->title)
                        printf(_("Title is \"%s\".\n"), popt->title);