Re: test CHECK on command line - Mailing list pgsql-novice

From Josh Kupershmidt
Subject Re: test CHECK on command line
Date
Msg-id BANLkTi=FLjzmZ-ezHoucCaxsGK0iXapztQ@mail.gmail.com
Whole thread Raw
In response to test CHECK on command line  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
List 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 by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: change p/w hashing
Next
From: Leon Starr
Date:
Subject: How to trap error: nextval: reached maximum value of sequence