timestamp in trigger

From: Laurent Belmonte <laurent(dot)belmonte(at)aliacom(dot)fr>
To: pgsql-bugs(at)postgresql(dot)org
Subject: timestamp in trigger
Date: 2002-04-29 16:39:28
Message-ID: 1020098369.18701.13.camel@boa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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 )

Browse pgsql-bugs by date

  From Date Subject
Next Message Bob Kenny 2002-04-30 09:46:05 LIKE Command
Previous Message Tom Lane 2002-04-29 14:39:34 Re: MetaData (size of datatype)