Re: on update of table set timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Campbell, Lance" <lance@xxxxxxxxxxxx> 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

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux