Problem with a Pettern Matching Check - Mailing list pgsql-sql

From Sebastian Siewior
Subject Problem with a Pettern Matching Check
Date
Msg-id 20050816001950.2225e5b8@mikejones.ghb.fh-furtwangen.de
Whole thread Raw
Responses Re: Problem with a Pettern Matching Check  (Andreas Seltenreich <andreas+pg@gate450.dyndns.org>)
Re: Problem with a Pettern Matching Check  (Michael Fuhr <mike@fuhr.org>)
List pgsql-sql
Hello hopefully correct List,

I was trying to do something that is not working as it supposed to.
First I created a table:

create table t ( col CHAR (3) CONSTRAINT numonly_col CHECK ( col ~ '^\\d+$' ) 
);

This check avoids non-numbers like '1a1' and allows '123'. For some
reason, I'm unable to find out why, it also avoids things like '1' and
'12'. Could someone please give me hint? :)

I was trying this one on PostgreSQL 8.0.3

-- 
Regards
Sebastian Siewior


pgsql-sql by date:

Previous
From: "Thomas F. O'Connell"
Date:
Subject: Re: sql function: using set as argument
Next
From: "Dmitri Bichko"
Date:
Subject: Re: Problem with a Pettern Matching Check