mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Allow new values to be added to an existing enum type.
After much expenditure of effort, we've got this to the point where the performance penalty is pretty minimal in typical cases. Andrew Dunstan, reviewed by Brendan Jurd, Dean Rasheed, and Tom Lane
This commit is contained in:
@ -2901,6 +2901,19 @@ _copyCreateEnumStmt(CreateEnumStmt *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static AlterEnumStmt *
|
||||
_copyAlterEnumStmt(AlterEnumStmt *from)
|
||||
{
|
||||
AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
|
||||
|
||||
COPY_NODE_FIELD(typeName);
|
||||
COPY_STRING_FIELD(newVal);
|
||||
COPY_STRING_FIELD(newValNeighbor);
|
||||
COPY_SCALAR_FIELD(newValIsAfter);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static ViewStmt *
|
||||
_copyViewStmt(ViewStmt *from)
|
||||
{
|
||||
@ -4064,6 +4077,9 @@ copyObject(void *from)
|
||||
case T_CreateEnumStmt:
|
||||
retval = _copyCreateEnumStmt(from);
|
||||
break;
|
||||
case T_AlterEnumStmt:
|
||||
retval = _copyAlterEnumStmt(from);
|
||||
break;
|
||||
case T_ViewStmt:
|
||||
retval = _copyViewStmt(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user