Problem with a Pettern Matching Check

From: Sebastian Siewior <lavish(at)kamp-dsl(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Problem with a Pettern Matching Check
Date: 2005-08-15 22:19:50
Message-ID: 20050816001950.2225e5b8@mikejones.ghb.fh-furtwangen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dmitri Bichko 2005-08-15 22:37:52 Re: Problem with a Pettern Matching Check
Previous Message Thomas F. O'Connell 2005-08-15 22:09:01 Re: sql function: using set as argument