Commit c64e68fd authored by Robert Haas's avatar Robert Haas

psql: Make \pset without arguments show all settings.

Gilles Darold, reviewed by Pavel Stehule
parent c2b175b9
...@@ -2272,13 +2272,10 @@ lo_import 152801 ...@@ -2272,13 +2272,10 @@ lo_import 152801
</para> </para>
</tip> </tip>
<note>
<para> <para>
It is an error to call <command>\pset</command> without any <command>\pset</command> without any arguments displays the current status
arguments. In the future this case might show the current status
of all printing options. of all printing options.
</para> </para>
</note>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
This diff is collapsed.
...@@ -247,7 +247,7 @@ slashUsage(unsigned short int pager) ...@@ -247,7 +247,7 @@ slashUsage(unsigned short int pager)
fprintf(output, _(" \\f [STRING] show or set field separator for unaligned query output\n")); fprintf(output, _(" \\f [STRING] show or set field separator for unaligned query output\n"));
fprintf(output, _(" \\H toggle HTML output mode (currently %s)\n"), fprintf(output, _(" \\H toggle HTML output mode (currently %s)\n"),
ON(pset.popt.topt.format == PRINT_HTML)); ON(pset.popt.topt.format == PRINT_HTML));
fprintf(output, _(" \\pset NAME [VALUE] set table output option\n" fprintf(output, _(" \\pset [NAME [VALUE]] set table output option\n"
" (NAME := {format|border|expanded|fieldsep|fieldsep_zero|footer|null|\n" " (NAME := {format|border|expanded|fieldsep|fieldsep_zero|footer|null|\n"
" numericlocale|recordsep|recordsep_zero|tuples_only|title|tableattr|pager})\n")); " numericlocale|recordsep|recordsep_zero|tuples_only|title|tableattr|pager})\n"));
fprintf(output, _(" \\t [on|off] show only rows (currently %s)\n"), fprintf(output, _(" \\t [on|off] show only rows (currently %s)\n"),
......
...@@ -52,3 +52,19 @@ more than one row returned for \gset ...@@ -52,3 +52,19 @@ more than one row returned for \gset
select 10 as test01, 20 as test02 from generate_series(1,0) \gset select 10 as test01, 20 as test02 from generate_series(1,0) \gset
no rows returned for \gset no rows returned for \gset
\unset FETCH_COUNT \unset FETCH_COUNT
-- show all pset options
\pset
Border style (border) is 1.
Target width (columns) unset.
Expanded display (expanded) is off.
Field separator (fieldsep) is "|".
Default footer (footer) is on.
Output format (format) is aligned.
Line style (linestyle) is ascii.
Null display (null) is "".
Locale-adjusted numeric output (numericlocale) is off.
Pager (pager) is used for long output.
Record separator (recordsep) is <newline>.
Table attributes (tableattr) unset.
Title (title) unset.
Tuples only (tuples_only) is off.
...@@ -37,3 +37,6 @@ select 10 as test01, 20 as test02 from generate_series(1,3) \gset ...@@ -37,3 +37,6 @@ select 10 as test01, 20 as test02 from generate_series(1,3) \gset
select 10 as test01, 20 as test02 from generate_series(1,0) \gset select 10 as test01, 20 as test02 from generate_series(1,0) \gset
\unset FETCH_COUNT \unset FETCH_COUNT
-- show all pset options
\pset
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment