mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Allow IF NOT EXISTS when add a new enum label.
If the label is already in the enum the statement becomes a no-op. This will reduce the pain that comes from our not allowing this operation inside a transaction block. Andrew Dunstan, reviewed by Tom Lane and Magnus Hagander.
This commit is contained in:
@@ -1188,7 +1188,8 @@ AlterEnum(AlterEnumStmt *stmt)
|
||||
|
||||
/* Add the new label */
|
||||
AddEnumLabel(enum_type_oid, stmt->newVal,
|
||||
stmt->newValNeighbor, stmt->newValIsAfter);
|
||||
stmt->newValNeighbor, stmt->newValIsAfter,
|
||||
stmt->skipIfExists);
|
||||
|
||||
ReleaseSysCache(tup);
|
||||
}
|
||||
|
Reference in New Issue
Block a user