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

Commit2b03198

Browse files
committed
Avoid misleading error message when SET/RESET target variable name
doesn't match any known variable.
1 parent7184a42 commit2b03198

File tree

1 file changed

+9
-5
lines changed
  • src/backend/utils/misc

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* command, configuration file, and command line options.
66
* See src/backend/utils/misc/README for more information.
77
*
8-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.94 2002/09/10 16:09:02 tgl Exp $
8+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.95 2002/09/12 14:03:45 tgl Exp $
99
*
1010
* Copyright 2000 by PostgreSQL Global Development Group
1111
* Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -2123,15 +2123,19 @@ flatten_set_variable_args(const char *name, List *args)
21232123
StringInfoDatabuf;
21242124
List*l;
21252125

2126-
/* Fast path if just DEFAULT */
2126+
/*
2127+
* Fast path if just DEFAULT. We do not check the variable name in
2128+
* this case --- necessary for RESET ALL to work correctly.
2129+
*/
21272130
if (args==NIL)
21282131
returnNULL;
21292132

2133+
/* Else get flags for the variable */
21302134
record=find_option(name);
21312135
if (record==NULL)
2132-
flags=0;/* default assumptions */
2133-
else
2134-
flags=record->flags;
2136+
elog(ERROR,"'%s' is not a valid option name",name);
2137+
2138+
flags=record->flags;
21352139

21362140
/* Complain if list input and non-list variable */
21372141
if ((flags&GUC_LIST_INPUT)==0&&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp