Skip to content

Commit 2145a76

Browse files
committed
psql: allow \pset C in setting the title, matches \C
Report by David G. Johnston
1 parent 2d87eed commit 2145a76

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/src/sgml/ref/psql-ref.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2336,7 +2336,7 @@ lo_import 152801
23362336
</varlistentry>
23372337

23382338
<varlistentry>
2339-
<term><literal>title</literal></term>
2339+
<term><literal>title</literal> (or <literal>C</literal>)</term>
23402340
<listitem>
23412341
<para>
23422342
Sets the table title for any subsequently printed tables. This

src/bin/psql/command.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
26372637
}
26382638

26392639
/* set title override */
2640-
else if (strcmp(param, "title") == 0)
2640+
else if (strcmp(param, "C") == 0 || strcmp(param, "title") == 0)
26412641
{
26422642
free(popt->title);
26432643
if (!value)
@@ -2837,7 +2837,7 @@ printPsetInfo(const char *param, struct printQueryOpt *popt)
28372837
}
28382838

28392839
/* show title override */
2840-
else if (strcmp(param, "title") == 0)
2840+
else if (strcmp(param, "C") == 0 || strcmp(param, "title") == 0)
28412841
{
28422842
if (popt->title)
28432843
printf(_("Title is \"%s\".\n"), popt->title);

0 commit comments

Comments
 (0)