timestamp in trigger
timestamp in trigger
От:
Laurent Belmonte <laurent.belmonte@aliacom.fr>
Дата:
In a ON UPDATE trigger on Toto table , i insert in a log a timestamp like this CREATE TABLE LogProtocole ( logprotocole_id SERIAL, logprotocole_message text, logprotocole_date timestamp, CONSTRAINT pk_logprotocole PRIMARY KEY (logprotocole_id) ); insert into logprotocole ( logprotocole_message,logprotocole_date) select 'toto','now'; when i use it x time , the logprotocole_date take value from an old one. ( there is lot of triggers on Toto table : on insert,on delete,before update ,after update )