Re: check constraint bug?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: check constraint bug?
Дата
Msg-id BANLkTimt7GMbEgkRtLvKFy+kK8KDOnn2Og@mail.gmail.com
обсуждение исходный текст
Ответ на check constraint bug?  (Tarlika Elisabeth Schmitz <postgresql3@numerixtechnology.de>)
Ответы Re: check constraint bug?  (Lew <noone@lewscanon.com>)
Список pgsql-sql
On Thu, May 5, 2011 at 11:06 PM, Tarlika Elisabeth Schmitz
<postgresql3@numerixtechnology.de> wrote:
> I specified:
>
> ALTER TABLE h ADD CONSTRAINT val_h_stats
> CHECK (NOT (sex = 'f') AND (stats IS NOT NULL));
>
> which was translated to:
>
> ALTER TABLE h ADD CONSTRAINT val_h_stats
> CHECK (NOT sex = 'f'::bpchar AND stats IS NOT NULL);

You need another level of parens:

CHECK (NOT ((sex = 'f') AND (stats IS NOT NULL)));


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

Предыдущее
От: Tarlika Elisabeth Schmitz
Дата:
Сообщение: check constraint bug?
Следующее
От: Claudio Adriano Guarracino
Дата:
Сообщение: Re: Select and merge rows?