From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements |
Date: | 2013-06-29 14:05:38 |
Message-ID: | CAFcNs+pQZ4QzGF-mBy=6pkyw__E62inX9DubWu7y2goahvT9sA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 24, 2013 at 8:05 AM, Andres Freund <andres(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Gilles Darold | 2013-06-29 15:05:22 | Re: psql and pset without any arguments |
Previous Message | Fabrízio de Royes Mello | 2013-06-29 13:53:14 | Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements |