From: Tom Lane <tgl@sss.pgh.pa.us>
To: Randall Lucas <rlucas@tercent.net>
Cc: Michael Teter <michael_teter@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: UNIQUE boolean: only one row may be "true"
Date: Tue, 06 May 2003 23:00:51 -0400
Message-ID: <24135.1052276451@sss.pgh.pa.us> (raw)
In-Reply-To: <19ACA479-7FF3-11D7-A71E-000A957653D6@tercent.net>
References: <19ACA479-7FF3-11D7-A71E-000A957653D6@tercent.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, rlucas@tercent.net, michael_teter@yahoo.com
Subject: Re: UNIQUE boolean: only one row may be "true"
In-Reply-To: <24135.1052276451@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox