psql: Fix \pset by adding missed xheader_width option to the help
I found that the help for \pset command missed xheader_width option.
Please, consider this small correction.
--
Pavel Luzanov
Postgres Professional:https://postgrespro.com
Attachments:
v1-0001-psql-Fix-help-for-pset-by-adding-missed-xheader_w.patchtext/x-patch; charset=UTF-8; name=v1-0001-psql-Fix-help-for-pset-by-adding-missed-xheader_w.patchDownload
From a5f59e77f3caf5b6bbbfc441393da68999e9e9fc Mon Sep 17 00:00:00 2001
From: Pavel Luzanov <p.luzanov@postgrespro.ru>
Date: Thu, 21 Nov 2024 22:32:44 +0300
Subject: [PATCH v1] psql: Fix help for \pset by adding missed xheader_width
option
psql --help=commands, psql --help=variables and corresponding
\? and \? variables inside psql missed xheader_width option
for the pset command.
---
src/bin/psql/help.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
index 02fe5d151e..e657dc8448 100644
--- a/src/bin/psql/help.c
+++ b/src/bin/psql/help.c
@@ -294,7 +294,7 @@ slashUsage(unsigned short int pager)
" numericlocale|pager|pager_min_lines|recordsep|\n"
" recordsep_zero|tableattr|title|tuples_only|\n"
" unicode_border_linestyle|unicode_column_linestyle|\n"
- " unicode_header_linestyle)\n");
+ " unicode_header_linestyle|xheader_width)\n");
HELPN(" \\t [on|off] show only rows (currently %s)\n",
ON(pset.popt.topt.tuples_only));
HELP0(" \\T [STRING] set HTML <table> tag attributes, or unset if none\n");
@@ -494,7 +494,10 @@ helpVariables(unsigned short int pager)
HELP0(" unicode_border_linestyle\n"
" unicode_column_linestyle\n"
" unicode_header_linestyle\n"
- " set the style of Unicode line drawing [single, double]\n");
+ " set the style of Unicode line drawing [single, double]\n"
+ " xheader_width\n"
+ " set the maximum width of the header for expanded output to one of\n"
+ " full (the default value), column, page, or an integer value\n");
HELP0("\nEnvironment variables:\n");
HELP0("Usage:\n");
--
2.34.1
On Thu, Nov 21, 2024 at 10:50:41PM +0300, Pavel Luzanov wrote:
I found that the help for \pset command missed xheader_width option.
Please, consider this small correction.
Good catch. This is a mistake from a45388d6e098. The patch should
have used HELP0() as this is a single variable, and the listing of
values uses squared parenthesis.
I've noticed that \parse is listed in an incorrect section, while
double-checking the whole. I'll also fix while on it, the second one
is on me.
--
Michael
On 22.11.2024 05:52, Michael Paquier wrote:
On Thu, Nov 21, 2024 at 10:50:41PM +0300, Pavel Luzanov wrote:
I found that the help for \pset command missed xheader_width option.
Good catch. This is a mistake from a45388d6e098. The patch should
have used HELP0() as this is a single variable, and the listing of
values uses squared parenthesis.
Of course, you are right. It's my inattention.
I've noticed that \parse is listed in an incorrect section, while
double-checking the whole. I'll also fix while on it, the second one
is on me.
I see your commits 768dfd8e6 and ea1581692.
Thank you vary much.
--
Pavel Luzanov
Postgres Professional:https://postgrespro.com