|
9 | 9 | * |
10 | 10 | * |
11 | 11 | * 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 $ |
13 | 13 | * |
14 | 14 | *------------------------------------------------------------------------- |
15 | 15 | */ |
@@ -999,7 +999,10 @@ parse_pg_options(char *value) |
999 | 999 | if (!superuser()) { |
1000 | 1000 | elog(ERROR,"Only users with superuser privilege can set pg_options"); |
1001 | 1001 | } |
1002 | | -parse_options((char*)value, TRUE); |
| 1002 | +if (value==NULL) |
| 1003 | +read_pg_options(0); |
| 1004 | +else |
| 1005 | +parse_options((char*)value, TRUE); |
1003 | 1006 | return (TRUE); |
1004 | 1007 | } |
1005 | 1008 |
|
@@ -1112,14 +1115,17 @@ static struct VariableParsers |
1112 | 1115 | }; |
1113 | 1116 |
|
1114 | 1117 | /*-----------------------------------------------------------------------*/ |
| 1118 | +/* |
| 1119 | + * Set the named variable, or reset to default value if value is NULL |
| 1120 | + */ |
1115 | 1121 | bool |
1116 | 1122 | SetPGVariable(constchar*name,constchar*value) |
1117 | 1123 | { |
1118 | 1124 | structVariableParsers*vp; |
1119 | 1125 | char*val; |
1120 | 1126 |
|
1121 | 1127 | /* Make a modifiable copy for convenience of get_token */ |
1122 | | -val=pstrdup(value); |
| 1128 | +val=value ?pstrdup(value) : ((char*)NULL); |
1123 | 1129 |
|
1124 | 1130 | for (vp=VariableParsers;vp->name;vp++) |
1125 | 1131 | { |
|