pgsql: Silently ignore any nonexistent schemas that are listed in searc - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Silently ignore any nonexistent schemas that are listed in searc
Date
Msg-id E1SI012-0006bM-GK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/880bfc3287dd68cfe90d10d9597d7b0fd2dae3e5

Modified Files
--------------
doc/src/sgml/config.sgml          |   26 +++++++++++-------
src/backend/catalog/namespace.c   |   51 +++++-------------------------------
src/test/regress/expected/guc.out |   34 +++++++++++++++++++------
src/test/regress/sql/guc.sql      |   20 +++++++++-----
4 files changed, 62 insertions(+), 69 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Accept postgres:// URIs in libpq connection functions
Next
From: Tom Lane
Date:
Subject: pgsql: Ignore missing schemas during non-interactive assignment of sear