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+pQZ4QzGF-mBy=6pkyw__E62inX9DubWu7y2goahvT9sA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers

On Mon, Jun 24, 2013 at 8:05 AM, Andres Freund <andres@2ndquadrant.com> wrote:
>
>
> I'd argue if we go that way - which seems to be a good idea - we really
> ought to make a complete pass and add it to all commands where it's
> currently missing.
>

Yeah... this is my purpose, but I decide do that in two steps. First with the patch already
sent to CF1 and second with another patch to cover the remaining CREATE commands.

I created a simple spreadsheet [1] to control my work. Suggestions are welcome.
 
>
> * CREATE DOMAIN
> * CREATE GROUP
> * CREATE TABLE AS
> * CREATE MATERIALIZED VIEW
> * CREATE SEQUENCE (we have ALTER but not CREATE?)
> * CREATE TABLESPACE (arguably slightly harder)
> * CREATE FOREIGN DATA WRAPPER
> * CREATE SERVER
> * CREATE DATABASE
> * CREATE USER MAPPING
> * CREATE TRIGGER
> * CREATE EVENT TRIGGER
> * CREATE INDEX
> * CLUSTER
>

Ok.

> Cases that seem useful, even though we have OR REPLACE:
> * CREATE VIEW
> * CREATE FUNCTION

+1

> Of dubious use:
> * CREATE OPERATOR CLASS
> * CREATE OPERATOR FAMILY
> * CREATE RULE
> * CREATE CONVERSION

In fact I would say that will be seldom used, but I don't see any
problem to implement them.

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 по дате отправления:

Предыдущее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
Следующее
От: Gilles Darold
Дата:
Сообщение: Re: psql and pset without any arguments