pgsql: Silently ignore any nonexistent schemas that are listed in searc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Silently ignore any nonexistent schemas that are listed in searc
Date: 2012-04-11 16:03:28
Message-ID: E1SI012-0006bM-GK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2012-04-12 00:25:37 pgsql: Fix cost estimation for indexscan filter conditions.
Previous Message Alvaro Herrera 2012-04-11 07:36:12 pgsql: Accept postgres:// URIs in libpq connection functions