Skip site navigation (1) Skip section navigation (2)

Re: BUG #5988: CTINE duplicates constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marko Tiikkaja" <marko(dot)tiikkaja(at)2ndquadrant(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5988: CTINE duplicates constraints
Date: 2011-04-20 23:13:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Marko Tiikkaja" <marko(dot)tiikkaja(at)2ndquadrant(dot)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

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

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Stephen FrostDate: 2011-04-21 01:34:08
Subject: Re: BUG #5990: 100% CPU reached
Previous:From: Tom LaneDate: 2011-04-20 21:47:30
Subject: Re: BUG #5985: CLUSTER ... USING can fail with ERROR: index xxx does not belong to table yyy

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group