summaryrefslogtreecommitdiff
path: root/src/backend/commands/extension.c
diff options
context:
space:
mode:
authorTom Lane2011-07-08 21:02:58 +0000
committerTom Lane2011-07-08 21:02:58 +0000
commit9d522cb35d8b4f266abadd0d019f68eb8802ae05 (patch)
tree684addb86e6997476745eaf00738875f6ac94a59 /src/backend/commands/extension.c
parent89fd72cbf26f5d2e3d86ab19c1ead73ab8fac0fe (diff)
Fix another oversight in logging of changes in postgresql.conf settings.
We were using GetConfigOption to collect the old value of each setting, overlooking the possibility that it didn't exist yet. This does happen in the case of adding a new entry within a custom variable class, as exhibited in bug #6097 from Maxim Boguk. To fix, add a missing_ok parameter to GetConfigOption, but only in 9.1 and HEAD --- it seems possible that some third-party code is using that function, so changing its API in a minor release would cause problems. In 9.0, create a near-duplicate function instead.
Diffstat (limited to 'src/backend/commands/extension.c')
-rw-r--r--src/backend/commands/extension.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index a0385eb0a18..9b9bb7dc8f0 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -814,14 +814,14 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
* error.
*/
save_client_min_messages =
- pstrdup(GetConfigOption("client_min_messages", false));
+ pstrdup(GetConfigOption("client_min_messages", false, false));
if (client_min_messages < WARNING)
(void) set_config_option("client_min_messages", "warning",
PGC_USERSET, PGC_S_SESSION,
GUC_ACTION_LOCAL, true);
save_log_min_messages =
- pstrdup(GetConfigOption("log_min_messages", false));
+ pstrdup(GetConfigOption("log_min_messages", false, false));
if (log_min_messages < WARNING)
(void) set_config_option("log_min_messages", "warning",
PGC_SUSET, PGC_S_SESSION,
@@ -836,7 +836,7 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
* but we cannot do that. We have to actually set the search_path GUC in
* case the extension script examines or changes it.
*/
- save_search_path = pstrdup(GetConfigOption("search_path", false));
+ save_search_path = pstrdup(GetConfigOption("search_path", false, false));
initStringInfo(&pathbuf);
appendStringInfoString(&pathbuf, quote_identifier(schemaName));