pgsql: Provide better message when CREATE EXTENSION can't find a target

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Provide better message when CREATE EXTENSION can't find a target
Date: 2013-06-04 21:23:06
Message-ID: E1Ujyh8-0002X4-4U@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Provide better message when CREATE EXTENSION can't find a target schema.

The new message (and SQLSTATE) matches the corresponding error cases in
namespace.c.

This was thought to be a "can't happen" case when extension.c was written,
so we didn't think hard about how to report it. But it definitely can
happen in 9.2 and later, since we no longer require search_path to contain
any valid schema names. It's probably also possible in 9.1 if search_path
came from a noninteractive source. So, back-patch to all releases
containing this code.

Per report from Sean Chittenden, though this isn't exactly his patch.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f94979f618abffb63cad2266f39db8beeeb18afc

Modified Files
--------------
src/backend/commands/extension.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2013-06-05 03:15:08 pgsql: doc: Add IDs to link targets used by phpPgAdmin
Previous Message Tom Lane 2013-06-04 19:42:32 pgsql: Add ARM64 (aarch64) support to s_lock.h.