10g: BIU trigger "plugins"

From: Frank Bergemann <FBergemann_at_web.de>
Date: Tue, 15 Feb 2011 07:10:12 -0800 (PST)
Message-ID: <8bd6cded-34e2-48a8-bb09-c2000b43ab9d_at_l18g2000yqm.googlegroups.com>

i have a problem for "before insert or update" trigger. Currently this trigger records old table X record in dedicated X_HIST table (same structure plus sequence counter). This is done with individual SQL insert into X_HIST table. I wanted to tune this. So instead of individual SQL insert i invoke a some_pkg.PushEntry(...) function.
pl/sql package 'some_pkg' manages a collection to buffer given X records.
When all my stuff is done, then i invoke a some_pkg.InsertEntries() to do a bulk insert.
But for this i detect duplicates in the collection! I don't know why there are these duplicates.

Do triggers "not play niceley" with pl/sql collections for this? It feels, like there are multiple invocations of trigger for the same X record.
And it doesn't harm if i use the individual SQL insert into X_HIST table.
But it's a problem if i try to delay SQL insert for bulk operation.

  • many thanks!

Frank Received on Tue Feb 15 2011 - 09:10:12 CST

Original text of this message