pgsql: Support renaming an existing value of an enum type.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Support renaming an existing value of an enum type.
Date: 2016-09-07 20:12:03
Message-ID: E1bhjCV-0000so-2u@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mail(dot)gmail(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2016-09-08 00:52:16 pgsql: 9.6 release notes: correct summary item about freeze
Previous Message Tom Lane 2016-09-07 17:36:22 pgsql: Doc: minor documentation improvements about extensions.