Re: Touch row ? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Touch row ?
Date
Msg-id 200401231609.16791.dev@archonet.com
Whole thread Raw
In response to Re: Touch row ?  ("Chris Boget" <chris@wild.net>)
List pgsql-general
On Friday 23 January 2004 15:52, Chris Boget wrote:
> > > 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?

That will work for insert, but won't change when you update.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: "Chris Boget"
Date:
Subject: Re: Touch row ?
Next
From: "scott.marlowe"
Date:
Subject: Re: psql: relocation error: psql: undefined symbol: PQgetssl