Re: UNIQUE boolean: only one row may be "true"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UNIQUE boolean: only one row may be "true"
Дата
Msg-id 24135.1052276451@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UNIQUE boolean: only one row may be "true"  (Randall Lucas <rlucas@tercent.net>)
Ответы Re: UNIQUE boolean: only one row may be "true"
Список 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 по дате отправления:

Предыдущее
От: Matt Mello
Дата:
Сообщение: "deadlock detected" documentation
Следующее
От: "A.Bhuvaneswaran"
Дата:
Сообщение: Re: "deadlock detected" documentation