Subject Re: Re[2]: [firebird-support] Re: Checking periods don't overlap
Author Ann W. Harrison
Sigh.

Perhaps someone will explain what's wrong with this picture,
but here's the script.

create table test (f1 integer not null);
alter table test add constraint dumb check (
not exists (select x.* from test x where x.f1 = new.f1));
commit;

insert into test (f1) values (1);

OK hold that thought. Now from another process:

insert into test (f1) values (1);
commit;

Now back to the first process:

commit;
select * from test;

F1
============

1
1

I foolishly thought that check constraints were evaluated
in system context. Sadly, it seems not. Would someone with
access to InterBase 7+ (or 7) check its behavior?


Thanks,


Ann