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

Commit18baa97

Browse files
committed
Looks like I broke SET variable = DEFAULT awhile ago. Ooops.
1 parent80b7955 commit18baa97

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/backend/commands/variable.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.30 2000/02/19 22:10:44 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.31 2000/02/27 21:10:41 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -999,7 +999,10 @@ parse_pg_options(char *value)
999999
if (!superuser()) {
10001000
elog(ERROR,"Only users with superuser privilege can set pg_options");
10011001
}
1002-
parse_options((char*)value, TRUE);
1002+
if (value==NULL)
1003+
read_pg_options(0);
1004+
else
1005+
parse_options((char*)value, TRUE);
10031006
return (TRUE);
10041007
}
10051008

@@ -1112,14 +1115,17 @@ static struct VariableParsers
11121115
};
11131116

11141117
/*-----------------------------------------------------------------------*/
1118+
/*
1119+
* Set the named variable, or reset to default value if value is NULL
1120+
*/
11151121
bool
11161122
SetPGVariable(constchar*name,constchar*value)
11171123
{
11181124
structVariableParsers*vp;
11191125
char*val;
11201126

11211127
/* Make a modifiable copy for convenience of get_token */
1122-
val=pstrdup(value);
1128+
val=value ?pstrdup(value) : ((char*)NULL);
11231129

11241130
for (vp=VariableParsers;vp->name;vp++)
11251131
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp