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

Re: WIP: Deferrable unique constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Deferrable unique constraints
Date: 2009-07-28 19:47:19
Message-ID: 6910.1248810439@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On Tue, 2009-07-28 at 15:15 -0400, Tom Lane wrote:
>> Sure it does.  Whether the check is immediate must be considered a
>> property of the index itself.  Any checking you do later could be
>> per-constraint, but the index is either going to fail at insert or not.

> My point is that the "immediate" behavior does not require the index
> itself to fail early. My original patch for generalized index
> constraints has the same behavior as UNIQUE currently does (including
> the fail early behavior), but can be used over indexes that know nothing
> about UNIQUE (list GiST).

Fail-early still sounds like a property of the index.  Whether the
property is implemented inside or outside the index AM isn't very
relevant.  Partial and functional index support are outside the AM, for
example, but we have no problem representing those features in pg_index.

In any case, this can be redesigned as needed when and if your other
patch gets to the point of being ready for consideration.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Mike RylanderDate: 2009-07-28 20:00:10
Subject: Re: xpath not a good replacement for xpath_string
Previous:From: Jeff DavisDate: 2009-07-28 19:42:38
Subject: Re: WIP: Deferrable unique constraints

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