]> granicus.if.org Git - postgresql/commit
Support renaming an existing value of an enum type.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Sep 2016 20:11:56 +0000 (16:11 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Sep 2016 20:11:56 +0000 (16:11 -0400)
commit0ab9c56d0fe3acc9d4717a9cbac6ef3369275b90
treebe4728c1545ab8182de6d3c637d3689ed9a14092
parentbd180b607927c7757af17cd6fce0e545e5c48584
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>
doc/src/sgml/ref/alter_type.sgml
src/backend/catalog/pg_enum.c
src/backend/commands/typecmds.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/include/catalog/pg_enum.h
src/include/nodes/parsenodes.h
src/test/regress/expected/enum.out
src/test/regress/sql/enum.sql