summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorTom Lane2016-09-07 20:11:56 +0000
committerTom Lane2016-09-07 20:11:56 +0000
commit0ab9c56d0fe3acc9d4717a9cbac6ef3369275b90 (patch)
treebe4728c1545ab8182de6d3c637d3689ed9a14092 /src/include/nodes
parentbd180b607927c7757af17cd6fce0e545e5c48584 (diff)
Support renaming an existing value of an enum type.
Not much to be said about this patch: it does what it says on the tin. In passing, rename AlterEnumStmt.skipIfExists to skipIfNewValExists to clarify what it actually does. In the discussion of this patch we considered supporting other similar options, such as IF EXISTS on the type as a whole or IF NOT EXISTS on the target name. This patch doesn't actually add any such feature, but it might happen later. Dagfinn Ilmari Mannsåker, reviewed by Emre Hasegeli Discussion: <CAO=2mx6uvgPaPDf-rHqG8=1MZnGyVDMQeh8zS4euRyyg4D35OQ@mail.gmail.com>
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/parsenodes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 3716c2eef96..8d3dcf4d4c1 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -2708,10 +2708,11 @@ typedef struct AlterEnumStmt
{
NodeTag type;
List *typeName; /* qualified name (list of Value strings) */
+ char *oldVal; /* old enum value's name, if renaming */
char *newVal; /* new enum value's name */
char *newValNeighbor; /* neighboring enum value, if specified */
bool newValIsAfter; /* place new enum value after neighbor? */
- bool skipIfExists; /* no error if label already exists */
+ bool skipIfNewValExists; /* no error if new already exists? */
} AlterEnumStmt;
/* ----------------------