aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/catalog/namespace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index b57c25595fc..15622f8423e 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -3565,8 +3565,10 @@ check_search_path(char **newval, void **extra, GucSource source)
/*
* If we aren't inside a transaction, we cannot do database access so
* cannot verify the individual names. Must accept the list on faith.
+ * Also, if the value is coming from a noninteractive source, accept it
+ * anyway.
*/
- if (IsTransactionState())
+ if (IsTransactionState() && source >= PGC_S_INTERACTIVE)
{
/*
* Verify that all the names are either valid namespace names or