Re: BUG #5988: CTINE duplicates constraints

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Tiikkaja <marko(dot)tiikkaja(at)2ndquadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5988: CTINE duplicates constraints
Date: 2011-04-25 17:18:36
Message-ID: BANLkTi=3hfwV4bPs0OsjDK6O41dGE8TJxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Apr 25, 2011 at 11:06 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Wed, Apr 20, 2011 at 7:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> 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.
>
>> IIRC, quite a few people voiced support for this feature, so I think
>> that ripping it out because you don't personally like it is not a good
>> solution.
>
> I will not stand in the way of someone else coming up with a less broken
> implementation.  But as you've noted, that seems to be a somewhat less
> than trivial project.  And time grows short.  I don't think it's
> unreasonable at all to pull this feature from 9.1 and let someone who
> cares about it submit a rewritten patch for 9.2.

Well, I'd like to make at least some minimal effort to see whether we
can fix it before we give up on it completely. A little poking around
suggests that this actually isn't that hard. Attached please find a
proposed patch which fixes the Marko's original complaint, the related
problem with serial columns that you noted, and the information leak I
noted of in my previous reply. The guts of the change are in
transformCreateStmt(). It might eventually be worth doing some more
extensive refactoring in this area, but this seems good enough for
now.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
fix-ctine.patch application/octet-stream 12.6 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2011-04-25 19:57:17 Re: [BUGS] [JDBC] Missing documentation for error code: 80S01
Previous Message Tom Lane 2011-04-25 15:06:28 Re: BUG #5988: CTINE duplicates constraints