Re: on update of table set timestamp - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: on update of table set timestamp
Date
Msg-id 4C20888402000025000327DB@gw.wicourts.gov
Whole thread Raw
In response to on update of table set timestamp  ("Campbell, Lance" <lance@illinois.edu>)
List pgsql-admin
"Campbell, Lance" <lance@illinois.edu> wrote:

> I want to add a timestamp column to some of my important table
> such that whenever an SQL "update" command is executed on the
> table the "updated_timestamp" timestamp column would be set with
> "now()".

I would write one function which I would bind as a BEFORE UPDATE
trigger to all the tables with the updated_timestamp column.  You
don't need to write a separate function for each table.

-Kevin

pgsql-admin by date:

Previous
From: "Campbell, Lance"
Date:
Subject: on update of table set timestamp
Next
From: "Kevin Grittner"
Date:
Subject: Re: Postgresql 9.0b2 : pg_upgrade not passing username to pgdumpall ?