1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Add ALTER EXTENSION ADD/DROP ACCESS METHOD, and use it in pg_upgrade.

Without this, an extension containing an access method is not properly
dumped/restored during pg_upgrade --- the AM ends up not being a member
of the extension after upgrading.

Another oversight in commit 473b93287, reported by Andrew Dunstan.

Report: <f7ac29f3-515c-2a44-21c5-ec925053265f@dunslane.net>
This commit is contained in:
Tom Lane
2016-10-02 14:31:28 -04:00
parent 4677fe9fb0
commit f40334b85c
3 changed files with 14 additions and 1 deletions

View File

@ -3929,7 +3929,16 @@ alter_extension_opt_item:
*****************************************************************************/
AlterExtensionContentsStmt:
ALTER EXTENSION name add_drop AGGREGATE func_name aggr_args
ALTER EXTENSION name add_drop ACCESS METHOD name
{
AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt);
n->extname = $3;
n->action = $4;
n->objtype = OBJECT_ACCESS_METHOD;
n->objname = list_make1(makeString($7));
$$ = (Node *)n;
}
| ALTER EXTENSION name add_drop AGGREGATE func_name aggr_args
{
AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt);
n->extname = $3;