Re: Touch row ? - Mailing list pgsql-general

From Chris Boget
Subject Re: Touch row ?
Date
Msg-id 01b101c3e1c8$d927aa30$8c01a8c0@ENTROPY
Whole thread Raw
In response to Re: Upcoming events  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Touch row ?
Re: Touch row ?
Re: Touch row ?
List 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


pgsql-general by date:

Previous
From: "Lee Harr"
Date:
Subject: sequence in schema -- broken default
Next
From: Doug McNaught
Date:
Subject: Re: Touch row ?