BUG #3056: strange behave of CHECK constraint

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3056: strange behave of CHECK constraint
Date: 2007-02-22 16:48:58
Message-ID: 200702221648.l1MGmw7X099559@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 3056
Logged by: Pavel Stehule
Email address: pavel(dot)stehule(at)hotmail(dot)com
PostgreSQL version: 8.3
Operating system: Linux
Description: strange behave of CHECK constraint
Details:

Hello,

check constraint doesn't work correct:

opeerator similar works well:

root=# select '233' not similar to '%[^0-9]%';
?column?
----------
t
(1 dka)

but:
root=# create table tt(a varchar check (a not similar to '%[0-9]%'));
CREATE TABLE
root=# insert into tt values('233');
ERROR: new row for relation "tt" violates check constraint "tt_a_check"

Regards
Pavel Stehule

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Douglas Toltzman 2007-02-22 16:55:53 Re: BUG #3056: strange behave of CHECK constraint
Previous Message Feng Chen 2007-02-22 16:41:59 Re: pg_dump and truncate