Re: Date of creation and of change - Mailing list pgsql-sql

From Andreas Tille
Subject Re: Date of creation and of change
Date
Msg-id Pine.LNX.4.21.0008251647210.716-100000@wr-linux02.rki.de
Whole thread Raw
In response to Re: Re: Date of creation and of change  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Fri, 25 Aug 2000, Tom Lane wrote:

> I think you are getting burnt by premature constant folding --- see
> nearby discussion of how to define a column default that gives the
> time of insertion.  You need to write this as
>     NEW.ChangedAt := now();
> to prevent the system from reducing timestamp('now') to a constant
> when the function is first executed.
This doesn't work, too.
It just puts allways the constant time when the function was created
into the database.  May be it has to be escaped in somw way??

I don't know how to follow hlefebvre's hint to "put null" into the
field.

Bay the way:  If we once solved the problem it might be a topic for
the FAQ, perhaps?

Kind regards
        Andreas.



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Date of creation and of change
Next
From: hlefebvre
Date:
Subject: Re: Re: Date of creation and of change