Re: test CHECK on command line

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема Re: test CHECK on command line
Дата
Msg-id BANLkTi=FLjzmZ-ezHoucCaxsGK0iXapztQ@mail.gmail.com
обсуждение исходный текст
Ответ на test CHECK on command line  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
Список pgsql-novice
On Fri, Jun 17, 2011 at 12:12 AM, Jean-Yves F. Barbier <12ukwn@gmail.com> wrote:
> I'm trying to test CHECK constraints on command line but I miss something:
>
> SELECT '1234567890123' ~ 'CHECK(char_length(VALUE) = 13)';
>
> always return FALSE :(

I would test out that CHECK constraint with something like:
   SELECT some_column FROM table WHERE char_length(some_column) != 13

I'm not sure what's going on with the SELECT statement you posted, but
that doesn't look valid.

Josh

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

Предыдущее
От: Josh Kupershmidt
Дата:
Сообщение: Re: change p/w hashing
Следующее
От: Leon Starr
Дата:
Сообщение: How to trap error: nextval: reached maximum value of sequence