Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org
Date
Msg-id 13263.1026357905@sss.pgh.pa.us
Whole thread Raw
In response to Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org  (Bradley Baetz <bbaetz@student.usyd.edu.au>)
Responses Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org  (Bradley Baetz <bbaetz@student.usyd.edu.au>)
List pgsql-hackers
Bradley Baetz <bbaetz@student.usyd.edu.au> writes:
> I'm referring to the mysql |timestamp| type, which will update that
> column's contents to |now()| when any UPDATE is given for that partcular
> row, unless the column was assigned to. I don't know how to handle the
> last part in a trigger.

It'd probably be close enough to have an UPDATE trigger that does
if (new.timestamp = old.timestamp)    new.timestamp = now();
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Should this require CASCADE?
Next
From: Bradley Baetz
Date:
Subject: Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org