diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-10-24 23:04:37 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-10-24 23:05:41 -0400 |
| commit | 84c123be1de8a9955741e20c9f945571e40c545e (patch) | |
| tree | 6ea497e47ec62ef8e1ee83b9acfe1fcd2b2419d6 /src/backend/nodes/equalfuncs.c | |
| parent | 24b29ca8f9dc4a5e5f873f0fcb56438c526700f6 (diff) | |
| download | postgresql-84c123be1de8a9955741e20c9f945571e40c545e.tar.gz | |
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
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
| -rw-r--r-- | src/backend/nodes/equalfuncs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 19262aad66..7cb2192d94 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -1393,6 +1393,17 @@ _equalCreateEnumStmt(CreateEnumStmt *a, CreateEnumStmt *b) } static bool +_equalAlterEnumStmt(AlterEnumStmt *a, AlterEnumStmt *b) +{ + COMPARE_NODE_FIELD(typeName); + COMPARE_STRING_FIELD(newVal); + COMPARE_STRING_FIELD(newValNeighbor); + COMPARE_SCALAR_FIELD(newValIsAfter); + + return true; +} + +static bool _equalViewStmt(ViewStmt *a, ViewStmt *b) { COMPARE_NODE_FIELD(view); @@ -2700,6 +2711,9 @@ equal(void *a, void *b) case T_CreateEnumStmt: retval = _equalCreateEnumStmt(a, b); break; + case T_AlterEnumStmt: + retval = _equalAlterEnumStmt(a, b); + break; case T_ViewStmt: retval = _equalViewStmt(a, b); break; |
