triggers
Posted in 2005
Topics: Triggers, Constraints & Referential Integrity, Migration, Import/Export & Data Conversion
I want to create some triggers for my database, one on-update trigger, an on-insert trigger and an on-delete trigger. I've already read the manual about how to create triggers. My problem is: I want to write the rows that are effected into a file outside the database. pseudocode: on update unload TO 'update-file' select 'the updated row' I know that unload overrides the file, maybe it would be possible to append everything in one file?! but i hope my problem is described clear enough?! greetings chris
maybe something like:
CREATE TRIGGER before_trig
INSERT ON table1 REFERENCING NEW AS new
FOR EACH ROW
(
UNLOAD TO 'file' VALUES (new.col1, new.col2, new.col3, ...,
new.coln)
);
same for update and delete! Instead of unloading (and overriding) I
would like to append everything to a file