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
|
||||
-->
|
||||
|
||||
@ -118,7 +118,7 @@ SHOW ALL
|
||||
<term><literal>ALL</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Show the values of all configuration parameters.
|
||||
Show the values of all configuration parameters, with descriptions.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -164,17 +164,17 @@ SHOW geqo;
|
||||
Show all settings:
|
||||
<programlisting>
|
||||
SHOW ALL;
|
||||
name | setting
|
||||
--------------------------------+----------------------------------------------
|
||||
add_missing_from | off
|
||||
archive_command | unset
|
||||
australian_timezones | off
|
||||
name | setting | description
|
||||
--------------------------------+--------------------------------+----------------------------------------------------------------------------------------------
|
||||
add_missing_from | off | Automatically adds missing table references to FROM clauses.
|
||||
archive_command | unset | WAL archiving command.
|
||||
australian_timezones | off | Interprets ACST, CST, EST, and SAT as Australian time zones.
|
||||
.
|
||||
.
|
||||
.
|
||||
work_mem | 1024
|
||||
zero_damaged_pages | off
|
||||
(140 rows)
|
||||
work_mem | 1024 | Sets the maximum memory to be used for query workspaces.
|
||||
zero_damaged_pages | off | Continues processing past damaged page headers.
|
||||
(146 rows)
|
||||
</programlisting>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* 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)
|
||||
{
|
||||
/* need a tuple descriptor representing two TEXT columns */
|
||||
tupdesc = CreateTemplateTupleDesc(2, false);
|
||||
/* need a tuple descriptor representing three TEXT columns */
|
||||
tupdesc = CreateTemplateTupleDesc(3, false);
|
||||
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
|
||||
TEXTOID, -1, 0);
|
||||
TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
|
||||
TEXTOID, -1, 0);
|
||||
TupleDescInitEntry(tupdesc, (AttrNumber) 3, "description",
|
||||
TEXTOID, -1, 0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4415,14 +4418,17 @@ ShowAllGUCConfig(DestReceiver *dest)
|
||||
int i;
|
||||
TupOutputState *tstate;
|
||||
TupleDesc tupdesc;
|
||||
char *values[2];
|
||||
char *values[3];
|
||||
|
||||
/* need a tuple descriptor representing two TEXT columns */
|
||||
tupdesc = CreateTemplateTupleDesc(2, false);
|
||||
/* need a tuple descriptor representing three TEXT columns */
|
||||
tupdesc = CreateTemplateTupleDesc(3, false);
|
||||
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
|
||||
TEXTOID, -1, 0);
|
||||
TupleDescInitEntry(tupdesc, (AttrNumber) 2, "setting",
|
||||
TEXTOID, -1, 0);
|
||||
TupleDescInitEntry(tupdesc, (AttrNumber) 3, "description",
|
||||
TEXTOID, -1, 0);
|
||||
|
||||
|
||||
/* prepare for projection of tuples */
|
||||
tstate = begin_tup_output_tupdesc(dest, tupdesc);
|
||||
@ -4438,6 +4444,7 @@ ShowAllGUCConfig(DestReceiver *dest)
|
||||
/* assign to the values array */
|
||||
values[0] = (char *) conf->name;
|
||||
values[1] = _ShowOption(conf);
|
||||
values[2] = (char *) conf->short_desc;
|
||||
|
||||
/* send it to dest */
|
||||
do_tup_output(tstate, values);
|
||||
|
Reference in New Issue
Block a user