]> granicus.if.org Git - postgresql/commit
Silently ignore any nonexistent schemas that are listed in search_path.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Apr 2012 15:29:22 +0000 (11:29 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Apr 2012 16:02:50 +0000 (12:02 -0400)
commit880bfc3287dd68cfe90d10d9597d7b0fd2dae3e5
treefc098a016d67756b4841267b50b634c7be695a0b
parentb035cb9db7aa7c0f28581b23feb10d3c559701f6
Silently ignore any nonexistent schemas that are listed in search_path.

Previously we attempted to throw an error or at least warning for missing
schemas, but this was done inconsistently because of implementation
restrictions (in many cases, GUC settings are applied outside transactions
so that we can't do system catalog lookups).  Furthermore, there were
exceptions to the rule even in the beginning, and we'd been poking more
and more holes in it as time went on, because it turns out that there are
lots of use-cases for having some irrelevant items in a common search_path
value.  It seems better to just adopt a philosophy similar to what's always
been done with Unix PATH settings, wherein nonexistent or unreadable
directories are silently ignored.

This commit also fixes the documentation to point out that schemas for
which the user lacks USAGE privilege are silently ignored.  That's always
been true but was previously not documented.

This is mostly in response to Robert Haas' complaint that 9.1 started to
throw errors or warnings for missing schemas in cases where prior releases
had not.  We won't adopt such a significant behavioral change in a back
branch, so something different will be needed in 9.1.
doc/src/sgml/config.sgml
src/backend/catalog/namespace.c
src/test/regress/expected/guc.out
src/test/regress/sql/guc.sql