Skip to content

Commit e0d6630

Browse files
committed
Fix recent guc comment-to-default patch for custom variables.
1 parent ab6aa40 commit e0d6630

File tree

1 file changed

+7
-4
lines changed
  • src/backend/utils/misc

1 file changed

+7
-4
lines changed

src/backend/utils/misc/guc.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.339 2006/08/13 02:22:24 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.340 2006/08/13 15:37:02 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -4082,9 +4082,9 @@ verify_config_option(const char *name, const char *value,
40824082
if (parse_value(elevel, record, value, &source, false, NULL))
40834083
{
40844084
/*
4085-
* Mark record like presented in the config file. Be carefull if
4085+
* Mark record as present in the config file. Be carefull if
40864086
* you use this function for another purpose than config file
4087-
* verification. It causes confusion configfile parser.
4087+
* verification. It causes confusion in the config file parser.
40884088
*/
40894089
record->status |= GUC_IN_CONFFILE;
40904090

@@ -5512,7 +5512,10 @@ is_newvalue_equal(struct config_generic *record, const char *newvalue)
55125512
{
55135513
struct config_string *conf = (struct config_string *) record;
55145514

5515-
return strcmp(*conf->variable, newvalue) == 0;
5515+
if (!*conf->variable) /* custom variable with no value yet */
5516+
return false;
5517+
else
5518+
return strcmp(*conf->variable, newvalue) == 0;
55165519
}
55175520
}
55185521

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