FAQ
Hi list,

I'm trying to test CHECK constraints on command line but I miss something:

SELECT '1234567890123' ~ 'CHECK(char_length(VALUE) = 13)';

always return FALSE :(

JY
--
"What did you do when the ship sank?"
"I grabbed a cake of soap and washed myself ashore."

Search Discussions

  • Josh Kupershmidt at Jun 21, 2011 at 9:53 pm

    On Fri, Jun 17, 2011 at 12:12 AM, Jean-Yves F. Barbier 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedJun 17, '11 at 4:12a
activeJun 21, '11 at 9:53p
posts2
users2
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase