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

From Tom Lane
Subject Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
Date
Msg-id 3538.1393693878@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
Fabrízio de Royes Mello <fabriziomello@gmail.com> writes:
> On Sat, Jan 18, 2014 at 11:12 PM, Stephen Frost <sfrost@snowman.net> wrote:
>> Fabr�zio, can you clarify the use-case for things like CREATE AGGREGATE
>> to have IF NOT EXISTS rather than OR REPLACE, or if there is a reason
>> why both should exist?  Complicating our CREATE options is not something
>> we really wish to do without good reason and we certainly don't want to
>> add something now that we'll wish to remove in another version or two.

> Well I have a scenario with many servers to deploy DDL scripts, and most of
> them we must run without transaction control because some tasks like CREATE
> INDEX CONCURRENTLY, DROP/CREATE DATABASE, CLUSTER, etc.

> When an error occurs the script stops, but the previous commands was
> commited, then we must review the script to comment parts that was already
> executed and then run it again. Until now is not a really trouble, but in
> some cases we must deploy another DDL script that contains a new version of
> some object before we finish to fix the previous version that was in
> production, and if we have CINE for all CREATE objects this task will more
> easy because we just run it again without care if will replace the content
> and do not produce an error.

Why wouldn't COR semantics answer that requirement just as well, if not
better?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: commit fest status and release timeline
Next
From: Tom Lane
Date:
Subject: Re: Securing "make check" (CVE-2014-0067)