]> granicus.if.org Git - postgresql/commit
Allow IF NOT EXISTS when add a new enum label.
authorAndrew Dunstan <andrew@dunslane.net>
Sat, 22 Sep 2012 16:53:31 +0000 (12:53 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Sat, 22 Sep 2012 16:53:31 +0000 (12:53 -0400)
commit6d12b68cd7a93e279c8c690749b334c9f59ac7fa
treefadc9d82179c4ad7cd49198c97208b17e9db45bc
parent11e131854f8231a21613f834c40fe9d046926387
Allow IF NOT EXISTS when add a new enum label.

If the label is already in the enum the statement becomes a no-op.
This will reduce the pain that comes from our not allowing this
operation inside a transaction block.

Andrew Dunstan, reviewed by Tom Lane and Magnus Hagander.
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