Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61e2c00

Browse files
committed
Have SHOW ALL include variable descriptions.
Matthias Schmidt
1 parentcf48d8b commit61e2c00

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

‎doc/src/sgml/ref/show.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/show.sgml,v 1.38 2005/04/08 00:59:58 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/show.sgml,v 1.39 2005/06/14 20:42:52 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -118,7 +118,7 @@ SHOW ALL
118118
<term><literal>ALL</literal></term>
119119
<listitem>
120120
<para>
121-
Show the values of all configuration parameters.
121+
Show the values of all configuration parameters, with descriptions.
122122
</para>
123123
</listitem>
124124
</varlistentry>
@@ -164,17 +164,17 @@ SHOW geqo;
164164
Show all settings:
165165
<programlisting>
166166
SHOW ALL;
167-
name |setting
168-
--------------------------------+----------------------------------------------
169-
add_missing_from | off
170-
archive_command | unset
171-
australian_timezones | off
167+
name |setting | description
168+
--------------------------------+--------------------------------+----------------------------------------------------------------------------------------------
169+
add_missing_from | off | Automatically adds missing table references to FROM clauses.
170+
archive_command | unset | WAL archiving command.
171+
australian_timezones | off | Interprets ACST, CST, EST, and SAT as Australian time zones.
172172
.
173173
.
174174
.
175-
work_mem | 1024
176-
zero_damaged_pages | off
177-
(140 rows)
175+
work_mem | 1024 | Sets the maximum memory to be used for query workspaces.
176+
zero_damaged_pages | off | Continues processing past damaged page headers.
177+
(146 rows)
178178
</programlisting>
179179
</para>
180180
</refsect1>

‎src/backend/utils/misc/guc.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.265 2005/06/1417:43:13 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.266 2005/06/1420:42:53 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -4337,12 +4337,15 @@ GetPGVariableResultDesc(const char *name)
43374337

43384338
if (pg_strcasecmp(name,"all")==0)
43394339
{
4340-
/* need a tuple descriptor representingtwo TEXT columns */
4341-
tupdesc=CreateTemplateTupleDesc(2, false);
4340+
/* need a tuple descriptor representingthree TEXT columns */
4341+
tupdesc=CreateTemplateTupleDesc(3, false);
43424342
TupleDescInitEntry(tupdesc, (AttrNumber)1,"name",
43434343
TEXTOID,-1,0);
43444344
TupleDescInitEntry(tupdesc, (AttrNumber)2,"setting",
43454345
TEXTOID,-1,0);
4346+
TupleDescInitEntry(tupdesc, (AttrNumber)3,"description",
4347+
TEXTOID,-1,0);
4348+
43464349
}
43474350
else
43484351
{
@@ -4415,14 +4418,17 @@ ShowAllGUCConfig(DestReceiver *dest)
44154418
inti;
44164419
TupOutputState*tstate;
44174420
TupleDesctupdesc;
4418-
char*values[2];
4421+
char*values[3];
44194422

4420-
/* need a tuple descriptor representingtwo TEXT columns */
4421-
tupdesc=CreateTemplateTupleDesc(2, false);
4423+
/* need a tuple descriptor representingthree TEXT columns */
4424+
tupdesc=CreateTemplateTupleDesc(3, false);
44224425
TupleDescInitEntry(tupdesc, (AttrNumber)1,"name",
44234426
TEXTOID,-1,0);
44244427
TupleDescInitEntry(tupdesc, (AttrNumber)2,"setting",
44254428
TEXTOID,-1,0);
4429+
TupleDescInitEntry(tupdesc, (AttrNumber)3,"description",
4430+
TEXTOID,-1,0);
4431+
44264432

44274433
/* prepare for projection of tuples */
44284434
tstate=begin_tup_output_tupdesc(dest,tupdesc);
@@ -4438,6 +4444,7 @@ ShowAllGUCConfig(DestReceiver *dest)
44384444
/* assign to the values array */
44394445
values[0]= (char*)conf->name;
44404446
values[1]=_ShowOption(conf);
4447+
values[2]= (char*)conf->short_desc;
44414448

44424449
/* send it to dest */
44434450
do_tup_output(tstate,values);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp