> twice inside of one transaction (WRT key changes), it's possible to
> fool the trigger and end up with inconsistent data in a multiuser
OK let's assume that customer is not deleted while order is
enetered. At my work I have used InterBase quite a lot. Up to IB 5
there was also no foreign keys, so it had to be done with triggers
just like in PostgreSQL. So when using IB 4 I usually did
something like this:
CREATE EXCEPTION CHILD_INSERT_RESTRICT "Cannot
INSERT ORDER because CUSTOMER does not exist in
CREATE TRIGGER BI_ORDER FOR ORDER BEFORE INSERT
DECLARE VARIABLE numrows INTEGER;
select count(distinct CustomerID)
IF (numrows = 0 ) THEN
I think there is some small syntax differences in PostgreSQL.
So, can somebody please put this into PostgreSQL syntax for me?
I searched the manuals but found no Exeption ... is it possible to
use Exceptions in PostgreSQL?
Also, does there excist special aliases like NEW and OLD in
In response to
pgsql-general by date
|Next:||From: Marten Feldtmann||Date: 2000-03-07 18:58:58|
|Subject: Re: [GENERAL] 50 MB Table|
|Previous:||From: Francis Lachapelle||Date: 2000-03-07 17:49:51|