From 2145a766044b4de32ab154a074ade0bf78d021df Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 5 Oct 2015 20:56:38 -0400 Subject: [PATCH] psql: allow \pset C in setting the title, matches \C Report by David G. Johnston --- doc/src/sgml/ref/psql-ref.sgml | 2 +- src/bin/psql/command.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index f5c9552ed10..212dbfa154c 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -2336,7 +2336,7 @@ lo_import 152801 - title + title (or C) Sets the table title for any subsequently printed tables. This diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 8156b763e92..5163c765bae 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -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);