mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Create extension infrastructure for the core procedural languages.
This mostly just involves creating control, install, and update-from-unpackaged scripts for them. However, I had to adjust plperl and plpython to not share the same support functions between variants, because we can't put the same function into multiple extensions. catversion bump forced due to new contents of pg_pltemplate, and because initdb now installs plpgsql as an extension not a bare language. Add support for regression testing these as extensions not bare languages. Fix a couple of other issues that popped up while testing this: my initial hack at pg_dump binary-upgrade support didn't work right, and we don't want an extra schema permissions test after all. Documentation changes still to come, but I'm committing now to see whether the MSVC build scripts need work (likely they do).
This commit is contained in:
@ -1188,7 +1188,6 @@ CreateExtension(CreateExtensionStmt *stmt)
|
||||
List *requiredExtensions;
|
||||
List *requiredSchemas;
|
||||
Oid extensionOid;
|
||||
AclResult aclresult;
|
||||
ListCell *lc;
|
||||
|
||||
/* Check extension name validity before any filesystem access */
|
||||
@ -1393,13 +1392,13 @@ CreateExtension(CreateExtensionStmt *stmt)
|
||||
}
|
||||
|
||||
/*
|
||||
* Check we have creation rights in target namespace. Although strictly
|
||||
* speaking the extension itself isn't in the schema, it will almost
|
||||
* certainly want to create objects therein, so let's just check now.
|
||||
* We don't check creation rights on the target namespace here. If the
|
||||
* extension script actually creates any objects there, it will fail if
|
||||
* the user doesn't have such permissions. But there are cases such as
|
||||
* procedural languages where it's convenient to set schema = pg_catalog
|
||||
* yet we don't want to restrict the command to users with ACL_CREATE
|
||||
* for pg_catalog.
|
||||
*/
|
||||
aclresult = pg_namespace_aclcheck(schemaOid, extowner, ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, ACL_KIND_NAMESPACE, schemaName);
|
||||
|
||||
/*
|
||||
* Look up the prerequisite extensions, and build lists of their OIDs
|
||||
|
Reference in New Issue
Block a user