Re: UNIQUE boolean: only one row may be "true" - Mailing list pgsql-sql

From Tom Lane
Subject Re: UNIQUE boolean: only one row may be "true"
Date
Msg-id 24135.1052276451@sss.pgh.pa.us
Whole thread Raw
In response to Re: UNIQUE boolean: only one row may be "true"  (Randall Lucas <rlucas@tercent.net>)
Responses Re: UNIQUE boolean: only one row may be "true"  ("Ries van Twisk" <ries@jongert.nl>)
List pgsql-sql
Randall Lucas <rlucas@tercent.net> writes:
> Do you have any suggestions on how this might 
> better be implemented?  It seems to me that with a partial index, there 
> is not too much overhead and it doesn't seem too offensively 
> un-boycecoddean.

FWIW, I'd go with the unique partial index too.  It's a very efficient
solution.  But it's not portable :-(.  I'd be interested to hear what
people would do to solve this problem in bog-standard SQL.
        regards, tom lane



pgsql-sql by date:

Previous
From: Matt Mello
Date:
Subject: "deadlock detected" documentation
Next
From: "A.Bhuvaneswaran"
Date:
Subject: Re: "deadlock detected" documentation