|
4 | 4 | * |
5 | 5 | * Copyright (c) 2000-2004, PostgreSQL Global Development Group |
6 | 6 | * |
7 | | - * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.26 2004/10/08 01:36:35 tgl Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.27 2004/11/11 23:45:13 tgl Exp $ |
8 | 8 | */ |
9 | 9 |
|
10 | 10 | %{ |
@@ -203,25 +203,28 @@ ProcessConfigFile(GucContext context) |
203 | 203 | if (token != GUC_EOL) |
204 | 204 | goto parse_error; |
205 | 205 |
|
206 | | -item = palloc(sizeof *item); |
207 | | -item->name = opt_name; |
208 | | -item->value = opt_value; |
209 | | - |
210 | 206 | if (strcmp(opt_name,"custom_variable_classes") ==0) |
211 | 207 | { |
212 | 208 | /* |
213 | 209 | * This variable must be processed first as it controls |
214 | | - * the validity of other variables; so prepend to |
215 | | - * the list instead of appending. |
| 210 | + * the validity of other variables; so apply immediately. |
216 | 211 | */ |
217 | | -item->next = head; |
218 | | -head = item; |
219 | | -if (!tail) |
220 | | -tail = item; |
| 212 | +if (!set_config_option(opt_name, opt_value, context, |
| 213 | + PGC_S_FILE,false,true)) |
| 214 | +{ |
| 215 | +pfree(opt_name); |
| 216 | +pfree(opt_value); |
| 217 | +goto cleanup_exit; |
| 218 | +} |
| 219 | +pfree(opt_name); |
| 220 | +pfree(opt_value); |
221 | 221 | } |
222 | 222 | else |
223 | 223 | { |
224 | 224 | /* append to list */ |
| 225 | +item =palloc(sizeof *item); |
| 226 | +item->name = opt_name; |
| 227 | +item->value = opt_value; |
225 | 228 | item->next =NULL; |
226 | 229 | if (!head) |
227 | 230 | head = item; |
|