Re: conditional dropping of columns/constraints - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: conditional dropping of columns/constraints
Date
Msg-id 4A005757.3000007@dunslane.net
Whole thread Raw
In response to Re: conditional dropping of columns/constraints  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers

Robert Haas wrote:
> On Tue, May 5, 2009 at 8:56 AM, Andrew Dunstan <andrew@dunslane.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: conditional dropping of columns/constraints
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Prepared transactions vs novice DBAs, again