pgsql: Support renaming an existing value of an enum type.
От | Tom Lane |
---|---|
Тема | pgsql: Support renaming an existing value of an enum type. |
Дата | |
Msg-id | E1bhjCV-0000so-2u@gemulon.postgresql.org обсуждение исходный текст |
Список | 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 по дате отправления: