]> granicus.if.org Git - postgresql/commit
Provide better message when CREATE EXTENSION can't find a target schema.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 4 Jun 2013 21:22:29 +0000 (17:22 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 4 Jun 2013 21:22:43 +0000 (17:22 -0400)
commit2ff74efa40adac394f11070af8d2ee8c79ba96c0
treee22d81b43f61e594b999ed23f64d4f6f1fb62f98
parent612ecf311bf253cdb0c54252854c5298aa668203
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.
src/backend/commands/extension.c