Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements |
Дата | |
Msg-id | CAFcNs+pmNM+-nz7bNsV36AdVBMKHdQfbnU-w8TA-jvS1ucS0Kg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Patch to add support of "IF NOT EXISTS" to others
"CREATE" statements
|
Список | pgsql-hackers |
On Wed, Jun 12, 2013 at 4:00 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
>
>
> I'm wondering where "IF NOT EXISTS" and "OR REPLACE" will meet.
>
> For example, why doesn't your list include CREATE FUNCTION?
>
> I have on my personal todo list to add "OR REPLACE" support to CREATE
> AGGREGATE and CREATE OPERATOR. They are kind of like functions, after
> all, and CREATE OR REPLACE FUNCTION is clearly widely useful.
>
> I suppose both could be useful, but if we're going to make sweeping
> changes, perhaps that should be clarified.
>
I did not include "CREATE FUNCTION" precisely because I had the same doubts.
IMO the "IF NOT EXISTS" and "OR REPLACE" are differents, and can coexists in
>
>
> I'm wondering where "IF NOT EXISTS" and "OR REPLACE" will meet.
>
> For example, why doesn't your list include CREATE FUNCTION?
>
> I have on my personal todo list to add "OR REPLACE" support to CREATE
> AGGREGATE and CREATE OPERATOR. They are kind of like functions, after
> all, and CREATE OR REPLACE FUNCTION is clearly widely useful.
>
> I suppose both could be useful, but if we're going to make sweeping
> changes, perhaps that should be clarified.
>
I did not include "CREATE FUNCTION" precisely because I had the same doubts.
IMO the "IF NOT EXISTS" and "OR REPLACE" are differents, and can coexists in
the same statements but not used at the same time:
CREATE [ OF REPLACE | IF NOT EXISTS ] FUNCTION ...
> Btw., I also want REPLACE BUT DO NOT CREATE.
Can you explain more about it?
Regards,
--
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
I can use "IF NOT EXISTS" to "CREATE" a {FUNCTION | AGGREGATE | OPERATOR}
without replace (OR REPLACE) its definition to just create missing objects and don't
raise an exception if already exists.
> Btw., I also want REPLACE BUT DO NOT CREATE.
Can you explain more about it?
Regards,
--
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 по дате отправления: