Subject | RE: [ib-support] Firebird RC1 |
---|---|
Author | Martijn Tonies |
Post date | 2001-11-26T10:37:32Z |
Hi,
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
[Non-text portions of this message have been removed]
> create table t(a int not null primary key, b int);Will this problem get fixed in FB?
> create view v as select a,b from t;
> set term ^;
> create trigger tr for v before insert as
> begin insert into t values(new.a, new.b); end^
> set term ;^
>
> If "a" is the PK of T, you'll get a duplicate value
> exception: the default
> action took place, then the trigger tried to insert, too.
> Since both are
> using the value of "a" unmodified, they clash on the PK's index:
>
> SQL> insert into v values(0);
> Statement failed, SQLCODE = -803
> violation of PRIMARY or UNIQUE KEY constraint "INTEG_2" on table "T"
>
> There's no solution, you should do a fake join to force your
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
[Non-text portions of this message have been removed]