Re: conditional dropping of columns/constraints

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Chris Browne <cbbrowne(at)acm(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: conditional dropping of columns/constraints
Date: 2009-05-05 15:12:23
Message-ID: 4A005757.3000007@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Tue, May 5, 2009 at 8:56 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>> We have debated CREATE ... IF NOT EXISTS in the past, and there is no
>> consensus on what it should do, so we don't have it for any command. That is
>> quite a different case from what's being asked for, and the two should not
>> be conflated.
>>
>
> I must be missing something, because the semantics of CREATE ... IF
> NOT EXISTS seem pretty well-defined to me, at least for any object
> that has a name. Check whether that name is in use; if not, create
> the object per the specified definition.
>

And if it does exist but the definitions don't match? That's the issue
on which there has not been consensus. You apparently thing the command
should silently do nothing, but that's not what everyone thinks. (I have
no very strong feelings on the subject - I'm just explaining the issue.)

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2009-05-05 15:29:15 Re: Prepared transactions vs novice DBAs, again
Previous Message Bernd Helmle 2009-05-05 15:11:03 Re: bytea vs. pg_dump