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:15:50
Message-ID: 6389.1248808550@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 13:41 -0400, Tom Lane wrote:
>> I think we had better add the deferrability state to pg_index
>> to avoid this.

> This might make it difficult to allow multiple constraints to use the
> same index.

Huh?  That hardly seems possible anyway, if some of them want deferred
checks and others do not.

> I'm trying to figure out how this fits with the generalized index
> constraints idea. We may want the generalized index constraints to have
> the same "immediate" behavior, but that doesn't have much to do with the
> index.

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.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: pgsqlDate: 2009-07-28 19:21:12
Subject: xpath not a good replacement for xpath_string
Previous:From: Tom LaneDate: 2009-07-28 19:12:40
Subject: Re: system timezone regression failure

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