Re: CREATE TABLE IF NOT EXISTS AS

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Steve Rehfuss <steve(dot)rehfuss(at)iovation(dot)com>
Subject: Re: CREATE TABLE IF NOT EXISTS AS
Date: 2013-11-18 13:16:25
Message-ID: CAFcNs+o7tqNTYdDkkynXKxOquULXdef_FvtkJrSpFm_6bC1hKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 17, 2013 at 6:05 PM, David E. Wheeler <david(at)justatheory(dot)com>wrote:

> On Nov 16, 2013, at 4:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> >> Co-worker asked a question I could not answer: Why is IF NOT EXISTS not
> supported by CREATE TABLE AS?
> >
> > That's an even worse idea than plain CREATE IF NOT EXISTS (which was
> > put in over vocal objections from me and some other people). Not only
> > would you not have the faintest clue as to the properties of the table
> > afterwards, but no clue as to its contents either.
>
> You mean that, after running it, one cannot tell whether or not a new
> table was created or not without looking at it? I guess that makes sense,
> though sometimes I like to tell the system to assume that I know what I’m
> doing -- e.g., that either outcome works for me.
>
> Not essential as a core feature, mind you; I can use DO to accomplish the
> same thing. It’s just a bit more work that way. And perhaps that’s for the
> best.
>
>
I'm planning to implement it for the next commit fest (2014-01)...

Regards,

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2013-11-18 13:40:26 Re: appendPQExpBufferVA vs appendStringInfoVA
Previous Message Fujii Masao 2013-11-18 13:14:31 Re: New option for pg_basebackup, to specify a different directory for pg_xlog