pgsql: Minor corrections for ALTER TYPE ADD VALUE IF NOT EXISTS patch.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Minor corrections for ALTER TYPE ADD VALUE IF NOT EXISTS patch.
Date: 2012-09-22 22:35:34
Message-ID: E1TFYIQ-0000GY-Ht@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Minor corrections for ALTER TYPE ADD VALUE IF NOT EXISTS patch.

Produce a NOTICE when the label already exists, for consistency with other
CREATE IF NOT EXISTS commands. Also, fix the code so it produces something
more user-friendly than an index violation when the label already exists.
This not incidentally enables making a regression test that the previous
patch didn't make for fear of exposing an unpredictable OID in the results.
Also some wordsmithing on the documentation.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/31510194cc9d87b355cb56e7d88c18c985d7a32a

Modified Files
--------------
doc/src/sgml/ref/alter_type.sgml | 15 ++++++++-------
src/backend/catalog/pg_enum.c | 29 ++++++++++++++++++++---------
src/include/nodes/parsenodes.h | 2 +-
src/test/regress/expected/enum.out | 6 +++---
src/test/regress/sql/enum.sql | 6 +-----
5 files changed, 33 insertions(+), 25 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2012-09-23 02:15:38 pgsql: Update translation updates instructions
Previous Message Andrew Dunstan 2012-09-22 17:57:50 pgsql: Fix docs typo