Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group