Re: BUG #15710: ADD COLUMN IF NOT EXISTS adds constraint anyways

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: thomas(at)palan(dot)at
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15710: ADD COLUMN IF NOT EXISTS adds constraint anyways
Date: 2019-03-21 14:18:10
Message-ID: 10528.1553177890@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> If I want to add a column to a table which and the column may or may not
> already exist, the specified column constraint like UNIQUE is added every
> time the command is issued, regardless if the column gets added or not.

Yeah, this is the same thing previously reported at

https://www.postgresql.org/message-id/flat/152509815280.19803.16118194452213577808%40wrigleys.postgresql.org

We haven't got further than sketching a design for a fix :-(

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-03-21 16:04:34 Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Previous Message Pavel Stehule 2019-03-21 13:20:17 Re: BUG #15709: if drop exists syntax