1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-08 22:02:03 +03:00

psql: allow \pset C in setting the title, matches \C

Report by David G. Johnston
This commit is contained in:
Bruce Momjian 2015-10-05 20:56:38 -04:00
parent 2d87eedc1d
commit 2145a76604
2 changed files with 3 additions and 3 deletions

View File

@ -2336,7 +2336,7 @@ lo_import 152801
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><literal>title</literal></term> <term><literal>title</literal> (or <literal>C</literal>)</term>
<listitem> <listitem>
<para> <para>
Sets the table title for any subsequently printed tables. This Sets the table title for any subsequently printed tables. This

View File

@ -2637,7 +2637,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
} }
/* set title override */ /* set title override */
else if (strcmp(param, "title") == 0) else if (strcmp(param, "C") == 0 || strcmp(param, "title") == 0)
{ {
free(popt->title); free(popt->title);
if (!value) if (!value)
@ -2837,7 +2837,7 @@ printPsetInfo(const char *param, struct printQueryOpt *popt)
} }
/* show title override */ /* show title override */
else if (strcmp(param, "title") == 0) else if (strcmp(param, "C") == 0 || strcmp(param, "title") == 0)
{ {
if (popt->title) if (popt->title)
printf(_("Title is \"%s\".\n"), popt->title); printf(_("Title is \"%s\".\n"), popt->title);