Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
Date
Msg-id CAFcNs+pQrD+oBkEarfRUNNbfWAnUtSCJT6r6tT9mthT=yPweVw@mail.gmail.com
Whole thread
In response to Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
List pgsql-hackers
On Mon, Jun 17, 2013 at 11:33 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
>
> Replace/alter the object if it already exists, but fail if it does not
> exist.
>
> The complete set of variants is:
>
> - object does not exist:
>
>     - proceed (normal CREATE)
>     - error (my above description)
>
> - object exists:
>
>     - replace (CREATE OR REPLACE)
>     - skip (CREATE IF NOT EXISTS)
>     - error (normal CREATE)
>

I understood.

The syntax can be like that?
- CREATE [ OR REPLACE | IF NOT EXISTS ] AGGREGATE ...
- CREATE [ OR REPLACE | IF NOT EXISTS ] OPERATOR ...
- CREATE [ OR REPLACE | IF NOT EXISTS ] FUNCTION ...

I can add this features too, but IMHO it is more prudent at this CF we just implement the IF NOT EXISTS according the initial proposal.

I'm planning another patch do next CF to add support to "IF NOT EXISTS" to others "CREATE" statements. See my planning [1].

Regards,

[1] https://docs.google.com/spreadsheet/ccc?key=0Ai7oCVcVQiKFdEctQUxNNlR1R2xRTUpJNFNDcFo4MUE&usp=sharing

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Vacuum, Freeze and Analyze: the big picture
Next
From: Noah Misch
Date:
Subject: Re: How do we track backpatches?