BUG #3056: strange behave of CHECK constraint - Mailing list pgsql-bugs

From Pavel Stehule
Subject BUG #3056: strange behave of CHECK constraint
Date
Msg-id 200702221648.l1MGmw7X099559@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #3056: strange behave of CHECK constraint
Re: BUG #3056: strange behave of CHECK constraint
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3056
Logged by:          Pavel Stehule
Email address:      pavel.stehule@hotmail.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

pgsql-bugs by date:

Previous
From: "Feng Chen"
Date:
Subject: Re: pg_dump and truncate
Next
From: Douglas Toltzman
Date:
Subject: Re: BUG #3056: strange behave of CHECK constraint