aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-04-11 12:02:14 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-04-11 12:03:05 -0400
commit35400e14b8e0dea994862d0f16d275b35b5e31b3 (patch)
tree55607c01da3547d05989cd1b3037514325ac8f1e /src
parent6cc2ed14f166604b11f85188724c47325ab37b4b (diff)
downloadpostgresql-35400e14b8e0dea994862d0f16d275b35b5e31b3.tar.gz
postgresql-35400e14b8e0dea994862d0f16d275b35b5e31b3.zip
Ignore missing schemas during non-interactive assignment of search_path.
This aligns 9.1's behavior with that of older branches. HEAD is now even laxer, ignoring missing schemas all the time, but that seems like too big a change for a released branch. Per complaint from Robert Haas.
Diffstat (limited to 'src')
-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