Dear All,
I have a table containing a CLOB column on which there is a trigger that fires on the AFTER UPDATE event.
The trigger inserts a copy of the
ld clob column and a copy of the :new clob column into an audit log table. If I update the clob value using code, the old and new values are logged as expected. If however I update the clob column using the PL/SQL developer grid view, the new value recorded by my trigger is always null.
Whilst trying to debug this "problem" I managed to generate a run time error in my trigger which (luckily) allowed me to see the error stack;
update
set DESCRIPTION = empty_clob()
where rowid =
lsqldev_rowid
returning DESCRIPTION into :v7
The stack implies that my trigger is logging a null value for :new because PL/SQL dev is setting DESCRIPTION to empty_clob() (presumably so it can then copy the new contents into the column). Perhaps the devs could confirm this point.
So, be warned, using PL/SQL Dev to update CLOB columns which happen to contain AFTER UPDATE Triggers can result in unexpected behaviour.
--
Dean
[This message has been edited by deanpm (edited 01 September 2003).]
I have a table containing a CLOB column on which there is a trigger that fires on the AFTER UPDATE event.
The trigger inserts a copy of the

Whilst trying to debug this "problem" I managed to generate a run time error in my trigger which (luckily) allowed me to see the error stack;
update
set DESCRIPTION = empty_clob()
where rowid =

returning DESCRIPTION into :v7
The stack implies that my trigger is logging a null value for :new because PL/SQL dev is setting DESCRIPTION to empty_clob() (presumably so it can then copy the new contents into the column). Perhaps the devs could confirm this point.
So, be warned, using PL/SQL Dev to update CLOB columns which happen to contain AFTER UPDATE Triggers can result in unexpected behaviour.

--
Dean
[This message has been edited by deanpm (edited 01 September 2003).]