[Info-ingres] Update rule also triggered when inserting rows?

Adrian Williamson adrian.williamson at rationalcommerce.com
Thu Feb 22 09:11:36 UTC 2018


Hi,

Which version of Ingres are you aksing about?

What does the procedure insert_bi_date_asqenh_proc  look like?

Does it update the table bi_date_asqenh?

Or does it touch other tables, which trigger further rules, which then
update bi_date_asqenh?

Have you tried using printrules?

Rules can be very hard to debug when 'nested'.

Good luck,

Adrian



-----Original Message-----
From: info-ingres-bounces at lists.planetingres.org
[mailto:info-ingres-bounces at lists.planetingres.org] On Behalf Of
nksvg1 at gmail.com
Sent: 22 February 2018 08:42
To: info-ingres at lists.planetingres.org
Subject: [Info-ingres] Update rule also triggered when inserting rows?

I've got those two rules:

create rule insert_bi_date_asqenh after insert on bi_date_asqenh execute
procedure insert_bi_date_asqenh_proc  (
c_grnoe   = new.c_grnoe,
d_episkep = new.d_episkep,
iatreio   = new.iatreio,
end_yper  = new.end_yper
)


create rule update_bi_date_asqenh after update (type) on bi_date_asqenh
execute procedure update_bi_date_asqenh  (
c_grnoe   = new.c_grnoe,
d_episkep = new.d_episkep,
iatreio   = new.iatreio,
end_yper  = new.end_yper,
error= new.error,
type=new.type
)

I'm trying to debug the update rule firing when it shouldn't, or I think it
shouldn't and I got the impression that the update rule is fired
automatically after the insert rule is fired, i.e after a row being insert

Is my assumption correct,or should I look elsewhere?
_______________________________________________
Info-ingres mailing list
Info-ingres at lists.planetingres.org
http://lists.planetingres.org/mailman/listinfo/info-ingres




More information about the Info-ingres mailing list