Consider this table definition: create table t ( i serial, b bool, c bool, constraint b_c check ( (b = true and c is not null ) or (b is distinct from true and c is null) ) constraint b_c check ( (b = true and c is not null ) or (b = false and c is null) or (b is null and c is null) ) ); Despite the above two constraints, the following rows get into the table: insert into t (b , c) values (null, true), (null, false);
- Check constraints do not seem to be working!!! Jitendra Loyal
- Re: Check constraints do not seem to be working!!... Chris Sterritt
- Re: Check constraints do not seem to be worki... Pavel Stehule
- Re: Check constraints do not seem to be working!!... Nikolay Samokhvalov
- Re: Check constraints do not seem to be worki... Jitendra Loyal
- Re: Check constraints do not seem to be w... Alban Hertroys
- Re: Check constraints do not seem to be w... Tomas Vondra
- Re: Check constraints do not seem to ... Jitendra Loyal
- Re: Check constraints do not seem to ... Laurenz Albe
- Re: Check constraints do not see... Jitendra Loyal