Skip to content

Commit 664f93c

Browse files
committed
Un-break custom_variable_classes kluge ... mea culpa.
1 parent fc402fd commit 664f93c

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/backend/utils/misc/guc-file.l

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
66
*
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 $
88
*/
99

1010
%{
@@ -203,25 +203,28 @@ ProcessConfigFile(GucContext context)
203203
if (token != GUC_EOL)
204204
goto parse_error;
205205

206-
item = palloc(sizeof *item);
207-
item->name = opt_name;
208-
item->value = opt_value;
209-
210206
if (strcmp(opt_name, "custom_variable_classes") == 0)
211207
{
212208
/*
213209
* 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.
216211
*/
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);
221221
}
222222
else
223223
{
224224
/* append to list */
225+
item = palloc(sizeof *item);
226+
item->name = opt_name;
227+
item->value = opt_value;
225228
item->next = NULL;
226229
if (!head)
227230
head = item;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy