diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-10 00:57:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-09-10 00:57:22 +0000 |
commit | 40fda15dcebdd07ee75ac1f55dad145f91297b99 (patch) | |
tree | 6cd1af9a9e865d6b25c4a20e4f5ee02d7f40a0e3 /src/backend/utils/cache/ts_cache.c | |
parent | 43df609daa0dbc941338564d0d77cfd852ab8385 (diff) | |
download | postgresql-40fda15dcebdd07ee75ac1f55dad145f91297b99.tar.gz postgresql-40fda15dcebdd07ee75ac1f55dad145f91297b99.zip |
Code review for GUC revert-values-if-removed-from-postgresql.conf patch;
and in passing, fix some bogosities dating from the custom_variable_classes
patch. Fix guc-file.l to correctly check changes in custom_variable_classes
that are attempted concurrently with additions/removals of custom variables,
and don't allow the new setting to be applied in advance of checking it.
Clean up messy and undocumented situation for string variables with NULL
boot_val. Fix DefineCustomVariable functions to initialize boot_val
correctly. Prevent find_option from inserting bogus placeholders for custom
variables that are simply inquired about rather than being set.
Diffstat (limited to 'src/backend/utils/cache/ts_cache.c')
-rw-r--r-- | src/backend/utils/cache/ts_cache.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c index 94051b8c32f..63c57905565 100644 --- a/src/backend/utils/cache/ts_cache.c +++ b/src/backend/utils/cache/ts_cache.c @@ -20,7 +20,7 @@ * Copyright (c) 2006-2007, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/ts_cache.c,v 1.2 2007/08/22 01:39:45 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/ts_cache.c,v 1.3 2007/09/10 00:57:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -592,14 +592,6 @@ getTSCurrentConfig(bool emitError) const char * assignTSCurrentConfig(const char *newval, bool doit, GucSource source) { - /* do nothing during initial GUC setup */ - if (newval == NULL) - { - if (doit) - TSCurrentConfigCache = InvalidOid; - return newval; - } - /* * If we aren't inside a transaction, we cannot do database access so * cannot verify the config name. Must accept it on faith. @@ -637,7 +629,7 @@ assignTSCurrentConfig(const char *newval, bool doit, GucSource source) newval = strdup(buf); pfree(buf); - if (doit) + if (doit && newval) TSCurrentConfigCache = cfgId; } else |