1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +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:
Tom Lane
2010-10-24 23:04:37 -04:00
parent 24b29ca8f9
commit 84c123be1d
23 changed files with 1422 additions and 170 deletions

View File

@@ -2193,6 +2193,18 @@ typedef struct CreateEnumStmt
List *vals; /* enum values (list of Value strings) */
} CreateEnumStmt;
/* ----------------------
* Alter Type Statement, enum types
* ----------------------
*/
typedef struct AlterEnumStmt
{
NodeTag type;
List *typeName; /* qualified name (list of Value strings) */
char *newVal; /* new enum value's name */
char *newValNeighbor; /* neighboring enum value, if specified */
bool newValIsAfter; /* place new enum value after neighbor? */
} AlterEnumStmt;
/* ----------------------
* Create View Statement