pgsql: Support renaming an existing value of an enum type. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Support renaming an existing value of an enum type.
Date
Msg-id E1bhjCV-0000so-2u@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0ab9c56d0fe3acc9d4717a9cbac6ef3369275b90

Modified Files
--------------
doc/src/sgml/ref/alter_type.sgml   | 68 ++++++++++++++++++++++--------
src/backend/catalog/pg_enum.c      | 85 ++++++++++++++++++++++++++++++++++++++
src/backend/commands/typecmds.c    | 20 ++++++---
src/backend/nodes/copyfuncs.c      |  3 +-
src/backend/nodes/equalfuncs.c     |  3 +-
src/backend/parser/gram.y          | 20 +++++++--
src/include/catalog/pg_enum.h      |  2 +
src/include/nodes/parsenodes.h     |  3 +-
src/test/regress/expected/enum.out | 22 ++++++++++
src/test/regress/sql/enum.sql      | 11 +++++
10 files changed, 208 insertions(+), 29 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: minor documentation improvements about extensions.
Next
From: Bruce Momjian
Date:
Subject: pgsql: 9.6 release notes: correct summary item about freeze