mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Have SHOW ALL include variable descriptions.
Matthias Schmidt
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/ref/show.sgml,v 1.38 2005/04/08 00:59:58 neilc Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/ref/show.sgml,v 1.39 2005/06/14 20:42:52 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ SHOW ALL
|
|||||||
<term><literal>ALL</literal></term>
|
<term><literal>ALL</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Show the values of all configuration parameters.
|
Show the values of all configuration parameters, with descriptions.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -164,17 +164,17 @@ SHOW geqo;
|
|||||||
Show all settings:
|
Show all settings:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SHOW ALL;
|
SHOW ALL;
|
||||||
name | setting
|
name | setting | description
|
||||||
--------------------------------+----------------------------------------------
|
--------------------------------+--------------------------------+----------------------------------------------------------------------------------------------
|
||||||
add_missing_from | off
|
add_missing_from | off | Automatically adds missing table references to FROM clauses.
|
||||||
archive_command | unset
|
archive_command | unset | WAL archiving command.
|
||||||
australian_timezones | off
|
australian_timezones | off | Interprets ACST, CST, EST, and SAT as Australian time zones.
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
work_mem | 1024
|
work_mem | 1024 | Sets the maximum memory to be used for query workspaces.
|
||||||
zero_damaged_pages | off
|
zero_damaged_pages | off | Continues processing past damaged page headers.
|
||||||
(140 rows)
|
(146 rows)
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.265 2005/06/14 17:43:13 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.266 2005/06/14 20:42:53 momjian Exp $
|
||||||
*
|
*
|
||||||
*--------------------------------------------------------------------
|
*--------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -4337,12 +4337,15 @@ GetPGVariableResultDesc(const char *name)
|
|||||||
|
|
||||||
if (pg_strcasecmp(name, "all") == 0)
|
if (pg_strcasecmp(name, "all") == 0)
|
||||||
{
|
{
|
||||||
/* need a tuple descriptor representing two TEXT columns */
|
/* need a tuple descriptor representing three TEXT columns */
|
||||||
tupdesc = CreateTemplateTupleDesc(2, false);
|
tupdesc = CreateTemplateTupleDesc(3, false);
|
||||||
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
|
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
|
||||||
TEXTOID, -1, 0);
|
TEXTOID, -1, 0);
|
||||||
TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
|
TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
|
||||||
TEXTOID, -1, 0);
|
TEXTOID, -1, 0);
|
||||||
|
TupleDescInitEntry(tupdesc, (AttrNumber) 3, "description",
|
||||||
|
TEXTOID, -1, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4415,14 +4418,17 @@ ShowAllGUCConfig(DestReceiver *dest)
|
|||||||
int i;
|
int i;
|
||||||
TupOutputState *tstate;
|
TupOutputState *tstate;
|
||||||
TupleDesc tupdesc;
|
TupleDesc tupdesc;
|
||||||
char *values[2];
|
char *values[3];
|
||||||
|
|
||||||
/* need a tuple descriptor representing two TEXT columns */
|
/* need a tuple descriptor representing three TEXT columns */
|
||||||
tupdesc = CreateTemplateTupleDesc(2, false);
|
tupdesc = CreateTemplateTupleDesc(3, false);
|
||||||
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
|
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
|
||||||
TEXTOID, -1, 0);
|
TEXTOID, -1, 0);
|
||||||
TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
|
TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
|
||||||
TEXTOID, -1, 0);
|
TEXTOID, -1, 0);
|
||||||
|
TupleDescInitEntry(tupdesc, (AttrNumber) 3, "description",
|
||||||
|
TEXTOID, -1, 0);
|
||||||
|
|
||||||
|
|
||||||
/* prepare for projection of tuples */
|
/* prepare for projection of tuples */
|
||||||
tstate = begin_tup_output_tupdesc(dest, tupdesc);
|
tstate = begin_tup_output_tupdesc(dest, tupdesc);
|
||||||
@ -4438,6 +4444,7 @@ ShowAllGUCConfig(DestReceiver *dest)
|
|||||||
/* assign to the values array */
|
/* assign to the values array */
|
||||||
values[0] = (char *) conf->name;
|
values[0] = (char *) conf->name;
|
||||||
values[1] = _ShowOption(conf);
|
values[1] = _ShowOption(conf);
|
||||||
|
values[2] = (char *) conf->short_desc;
|
||||||
|
|
||||||
/* send it to dest */
|
/* send it to dest */
|
||||||
do_tup_output(tstate, values);
|
do_tup_output(tstate, values);
|
||||||
|
Reference in New Issue
Block a user