]> granicus.if.org Git - postgresql/commit
Make CREATE EXTENSION check schema creation permissions.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 24 Aug 2011 01:49:07 +0000 (21:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 24 Aug 2011 01:49:16 +0000 (21:49 -0400)
commit7f7fdd2a17ce087f995a0660fadf3e9523d72810
tree8f75ea9a05deeebaf895bd17f79710c4dfe70fb3
parent48f545a3aef461a635b975443a99dd268269590a
Make CREATE EXTENSION check schema creation permissions.

When creating a new schema for a non-relocatable extension, we neglected
to check whether the calling user has permission to create schemas.
That didn't matter in the original coding, since we had already checked
superuserness, but in the new dispensation where users need not be
superusers, we should check it.  Use CreateSchemaCommand() rather than
calling NamespaceCreate() directly, so that we also enforce the rules
about reserved schema names.

Per complaint from KaiGai Kohei, though this isn't the same as his patch.
src/backend/commands/extension.c