Re: Touch row ?

From: "Chris Boget" <chris(at)wild(dot)net>
To: "Dustin Sallings" <dustin(at)spy(dot)net>, "NTPT" <ntpt(at)centrum(dot)cz>
Cc: "PostgreSQL-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Touch row ?
Date: 2004-01-23 15:52:04
Message-ID: 01b101c3e1c8$d927aa30$8c01a8c0@ENTROPY
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-general

> > is it possible to add column to database, that will automatically
> > contain date+time (or likely Unix timestamp) when the row was
> > touched/changed - ie by INSERT or UPDATE ?
> Yes, a very simple trigger can do this.

Wouldn't just setting the default value of the field to be NOW() accomplish
the same thing? Or can you not default the value of a timestamp field?

Chris

In response to

Responses

Browse pgsql-announce by date

  From Date Subject
Next Message Doug McNaught 2004-01-23 16:00:37 Re: Touch row ?
Previous Message Mike Mascari 2004-01-23 09:42:29 Re: Touch row ?

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2004-01-23 16:00:37 Re: Touch row ?
Previous Message CDE 2004-01-23 15:51:02 business references for postgresql