Triggers and Unix Time Format
Posted in 1994
-Vaibhav Dahake — — source: Informix-list mailing list archive (1991-1998)
Is is possible to set update time (in Unix format time_t)
in a trigger?
We have an update trigger in our database which keeps two
tables in sync for any updates and would like to keep
track of the time when the trigger was run.
The table has a column which keeps a record of the update
time in unix format (a long number, yeah we gave up on using
Informix datetime crazy formats and prefer good old Unix !!)
An idealistic C/Trigger statement would look like:
create trigger Aupdate of col1A on tableA
referencing new as newA
for each row
(update tableB
set
col2B = time(0) --How to do this ?
where --col2B is long & time() is an Unix func
col3B = newA.col4A --some condition
);
Thanks,
Vaibhav Dahake