Re: unique index with bool

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: unique index with bool
Дата
Msg-id 1116516884.31821.78.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на unique index with bool  (tmpmac@mac.com)
Список pgsql-general
On Thu, 2005-05-19 at 09:49, tmpmac@mac.com wrote:
> CREATE UNIQUE INDEX name on table(param1,param2);
>
> How to create such unique index when param2 is bool type, and this param2 should be accepted only in case of true ?
>
> I tried: CREATE UNIQUE INDEX name on table(param1,(param2 = 'true'));
> but it's not working.

Not sure if this is what you want:

create unique index on table(param1, param2) where param2 is true;

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Shared memory and FreeBSD's jail()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Shared memory and FreeBSD's jail()