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

Commit7b39f48

Browse files
committed
Split apart message_level_options into one set for server-side settings and
one for client-side, restoring the previous behaviour with differentsort order for the 'log' level. Also, remove redundant list of availableoptions, since the enum code will output it automatically.
1 parent8c3340f commit7b39f48

File tree

1 file changed

+30
-12
lines changed
  • src/backend/utils/misc

1 file changed

+30
-12
lines changed

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

Lines changed: 30 additions & 12 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.458 2008/06/30 22:10:43 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.459 2008/07/01 06:08:31 mha Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -172,18 +172,40 @@ static char *config_enum_get_options(struct config_enum *record,
172172
/*
173173
* Options for enum values defined in this module.
174174
*/
175-
staticconststructconfig_enum_entrymessage_level_options[]= {
175+
176+
/*
177+
* We have different sets for client and server message level options because
178+
* they sort slightly different (see "log" level)
179+
*/
180+
staticconststructconfig_enum_entryclient_message_level_options[]= {
176181
{"debug",DEBUG2, false},
177182
{"debug5",DEBUG5, false},
178183
{"debug4",DEBUG4, false},
179184
{"debug3",DEBUG3, false},
180185
{"debug2",DEBUG2, false},
181186
{"debug1",DEBUG1, false},
182187
{"log",LOG, false},
188+
{"info",INFO, true},
189+
{"notice",NOTICE, false},
190+
{"warning",WARNING, false},
191+
{"error",ERROR, false},
192+
{"fatal",FATAL, true},
193+
{"panic",PANIC, true},
194+
{NULL,0, false}
195+
};
196+
197+
staticconststructconfig_enum_entryserver_message_level_options[]= {
198+
{"debug",DEBUG2, false},
199+
{"debug5",DEBUG5, false},
200+
{"debug4",DEBUG4, false},
201+
{"debug3",DEBUG3, false},
202+
{"debug2",DEBUG2, false},
203+
{"debug1",DEBUG1, false},
183204
{"info",INFO, false},
184205
{"notice",NOTICE, false},
185206
{"warning",WARNING, false},
186207
{"error",ERROR, false},
208+
{"log",LOG, false},
187209
{"fatal",FATAL, false},
188210
{"panic",PANIC, false},
189211
{NULL,0, false}
@@ -2449,13 +2471,11 @@ static struct config_enum ConfigureNamesEnum[] =
24492471
{
24502472
{"client_min_messages",PGC_USERSET,LOGGING_WHEN,
24512473
gettext_noop("Sets the message levels that are sent to the client."),
2452-
gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, "
2453-
"DEBUG1, LOG, NOTICE, WARNING, and ERROR. Each level includes all the "
2454-
"levels that follow it. The later the level, the fewer messages are "
2455-
"sent.")
2474+
gettext_noop("Each level includes all the levels that follow it. The later"
2475+
" the level, the fewer messages are sent.")
24562476
},
24572477
&client_min_messages,
2458-
NOTICE,message_level_options,NULL,NULL
2478+
NOTICE,client_message_level_options,NULL,NULL
24592479
},
24602480

24612481
{
@@ -2480,12 +2500,10 @@ static struct config_enum ConfigureNamesEnum[] =
24802500
{
24812501
{"log_min_messages",PGC_SUSET,LOGGING_WHEN,
24822502
gettext_noop("Sets the message levels that are logged."),
2483-
gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, "
2484-
"INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level "
2485-
"includes all the levels that follow it.")
2503+
gettext_noop("Each level includes all levels that follow it.")
24862504
},
24872505
&log_min_messages,
2488-
WARNING,message_level_options,NULL,NULL
2506+
WARNING,server_message_level_options,NULL,NULL
24892507
},
24902508

24912509
{
@@ -2495,7 +2513,7 @@ static struct config_enum ConfigureNamesEnum[] =
24952513
"specified level or a higher level are logged.")
24962514
},
24972515
&log_min_error_statement,
2498-
ERROR,message_level_options,NULL,NULL
2516+
ERROR,server_message_level_options,NULL,NULL
24992517
},
25002518

25012519
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp