From e0d6630bd85745f5f6e1e491a188b6280d2ccc83 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 13 Aug 2006 15:37:02 +0000 Subject: [PATCH] Fix recent guc comment-to-default patch for custom variables. --- src/backend/utils/misc/guc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index caa4fc67a5..cda5a41142 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut . * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.339 2006/08/13 02:22:24 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.340 2006/08/13 15:37:02 momjian Exp $ * *-------------------------------------------------------------------- */ @@ -4082,9 +4082,9 @@ verify_config_option(const char *name, const char *value, if (parse_value(elevel, record, value, &source, false, NULL)) { /* - * Mark record like presented in the config file. Be carefull if + * Mark record as present in the config file. Be carefull if * you use this function for another purpose than config file - * verification. It causes confusion configfile parser. + * verification. It causes confusion in the config file parser. */ record->status |= GUC_IN_CONFFILE; @@ -5512,7 +5512,10 @@ is_newvalue_equal(struct config_generic *record, const char *newvalue) { struct config_string *conf = (struct config_string *) record; - return strcmp(*conf->variable, newvalue) == 0; + if (!*conf->variable) /* custom variable with no value yet */ + return false; + else + return strcmp(*conf->variable, newvalue) == 0; } } -- 2.40.0