Hi all, we have over 2000 tables for which we want to register all insert, update and delete operations. For this reason we have created rules that insert a row in a table that is used to store the operation performed.
These are the rules
This is the procedure
create procedure prd_spider_update (
cd_cliente VARCHAR(5) NOT NULL, cd_doc VARCHAR(3) NOT NULL, orario
VARCHAR(2) NOT NULL, nm_faldone INTEGER NOT NULL, nm_pratica INTEGER
NOT NULL, gr_pratica INTEGER NOT NULL, tp_operazione INTEGER NOT NULL
) AS begin
INSERT INTO spider (cd_cliente, cd_doc ,nm_faldone, nm_pratica,
gr_pratica, tp_operazione, tm_archiviaz)
SELECT :cd_cliente, :cd_doc, :nm_faldone, :nm_pratica,
:gr_pratica, :tp_operazione, CURRENT_TIMESTAMP()
In this way, cuncurrency is generated on the table spider which causes
locks on the database. There is a way to force a row-level lock on the table spider?
ps. your AFTER INSERT rule looks like it needs to refer to the new record rather than the old record?
Thank you all,
we will try to use dbevent, I think this is a good idea.
We never used it, but it seem the better solution.
|Location:||Huddersfield, West Yorkshire, UK|
|Nodes:||16 (2 / 14)|