mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Extend "ALTER EXTENSION ADD object" to permit "DROP object" as well.
Per discussion, this is something we should have sooner rather than later, and it doesn't take much additional code to support it.
This commit is contained in:
@ -3251,12 +3251,13 @@ _copyCreateExtensionStmt(CreateExtensionStmt *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static AlterExtensionAddStmt *
|
||||
_copyAlterExtensionAddStmt(AlterExtensionAddStmt *from)
|
||||
static AlterExtensionContentsStmt *
|
||||
_copyAlterExtensionContentsStmt(AlterExtensionContentsStmt *from)
|
||||
{
|
||||
AlterExtensionAddStmt *newnode = makeNode(AlterExtensionAddStmt);
|
||||
AlterExtensionContentsStmt *newnode = makeNode(AlterExtensionContentsStmt);
|
||||
|
||||
COPY_STRING_FIELD(extname);
|
||||
COPY_SCALAR_FIELD(action);
|
||||
COPY_SCALAR_FIELD(objtype);
|
||||
COPY_NODE_FIELD(objname);
|
||||
COPY_NODE_FIELD(objargs);
|
||||
@ -4266,8 +4267,8 @@ copyObject(void *from)
|
||||
case T_CreateExtensionStmt:
|
||||
retval = _copyCreateExtensionStmt(from);
|
||||
break;
|
||||
case T_AlterExtensionAddStmt:
|
||||
retval = _copyAlterExtensionAddStmt(from);
|
||||
case T_AlterExtensionContentsStmt:
|
||||
retval = _copyAlterExtensionContentsStmt(from);
|
||||
break;
|
||||
case T_CreateFdwStmt:
|
||||
retval = _copyCreateFdwStmt(from);
|
||||
|
Reference in New Issue
Block a user