pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marko Tiikkaja <marko.tiikkaja@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5988: CTINE duplicates constraints
Date: Wed, 20 Apr 2011 19:13:25 -0400
Message-ID: <22050.1303341205@sss.pgh.pa.us> (raw)
In-Reply-To: <201104201251.p3KCpox7062445@wwwmaster.postgresql.org>
References: <201104201251.p3KCpox7062445@wwwmaster.postgresql.org>

"Marko Tiikkaja" <marko.tiikkaja@2ndquadrant.com> writes:
> CREATE TABLE IF NOT EXISTS duplicates some constraints if the new table
> isn't created:

What this means is that the feature was implemented in the wrong place,
ie the short-circuit is after rather than before parse_utilcmds.c splits
up the CREATE TABLE command into multiple primitive actions.

I have stated previously my opinion that this is a misconceived feature,
and it's now apparent that the implementation is as poorly thought
through as the definition.  My recommendation is to revert that patch
altogether.

(BTW, before anyone suggests that s/continue/break/ would fix it,
I suggest experimenting with a table containing a serial column.)

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <22050.1303341205@sss.pgh.pa.us>
Permalink:  ../22050.1303341205@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22050.1303341205@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marko.tiikkaja@2ndquadrant.com
  Subject: Re: BUG #5988: CTINE duplicates constraints
  In-Reply-To: <22050.1303341205@sss.pgh.pa.us>
  References: <201104201251.p3KCpox7062445@wwwmaster.postgresql.org> <22050.1303341205@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox