Re: Constraint Problem

Поиск
Список
Период
Сортировка
От Ron St-Pierre
Тема Re: Constraint Problem
Дата
Msg-id 3FA5C17B.6000205@syscor.com
обсуждение исходный текст
Ответ на Re: Constraint Problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Ron St-Pierre <rstpierre@syscor.com> writes:
>
>>I just want to constrain the ysnDefault field to only allow one TRUE
>>value for any companyID/associationID pair, with no restrictions on the
>>number of FALSES.
>
>
> You could do that with a partial unique index.  There is an example
> at the bottom of
> http://www.postgresql.org/docs/7.3/static/indexes-partial.html
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>


Thanks Tom. That's exactly what I need.

Ron


В списке pgsql-general по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Custom types and arrays
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: slow query performance