aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc-file.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/misc/guc-file.l')
-rw-r--r--src/backend/utils/misc/guc-file.l25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l
index eb5f0c7f071..cb95347e592 100644
--- a/src/backend/utils/misc/guc-file.l
+++ b/src/backend/utils/misc/guc-file.l
@@ -4,7 +4,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.21 2004/02/24 22:06:32 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.22 2004/05/26 15:07:38 momjian Exp $
*/
%{
@@ -34,6 +34,7 @@ enum {
GUC_REAL = 4,
GUC_EQUALS = 5,
GUC_UNQUOTED_STRING = 6,
+ GUC_QUALIFIED_ID = 7,
GUC_EOL = 99,
GUC_ERROR = 100
};
@@ -65,6 +66,7 @@ LETTER [A-Za-z_\200-\377]
LETTER_OR_DIGIT [A-Za-z_0-9\200-\377]
ID {LETTER}{LETTER_OR_DIGIT}*
+QUALIFIED_ID {ID}"."{ID}
UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._:/])*
STRING \'([^'\n]|\\.)*\'
@@ -76,6 +78,7 @@ STRING \'([^'\n]|\\.)*\'
#.*$ /* eat comment */
{ID} return GUC_ID;
+{QUALIFIED_ID} return GUC_QUALIFIED_ID;
{STRING} return GUC_STRING;
{UNQUOTED_STRING} return GUC_UNQUOTED_STRING;
{INTEGER} return GUC_INTEGER;
@@ -180,7 +183,7 @@ ProcessConfigFile(GucContext context)
case 0: /* no previous input */
if (token == GUC_EOL) /* empty line */
continue;
- if (token != GUC_ID)
+ if (token != GUC_ID && token != GUC_QUALIFIED_ID)
goto parse_error;
opt_name = strdup(yytext);
if (opt_name == NULL)
@@ -217,6 +220,24 @@ ProcessConfigFile(GucContext context)
if (token != GUC_EOL)
goto parse_error;
+ if (strcmp(opt_name, "custom_variable_classes") == 0)
+ {
+ /* This variable must be added first as it controls the validity
+ * of other variables
+ */
+ if (!set_config_option(opt_name, opt_value, context,
+ PGC_S_FILE, false, true))
+ {
+ FreeFile(fp);
+ free(filename);
+ goto cleanup_exit;
+ }
+
+ /* Don't include in list */
+ parse_state = 0;
+ break;
+ }
+
/* append to list */
item = malloc(sizeof *item);
if (item == NULL)