Re: Date of creation and of change

Поиск
Список
Период
Сортировка
От Andreas Tille
Тема Re: Date of creation and of change
Дата
Msg-id Pine.LNX.4.21.0008251647210.716-100000@wr-linux02.rki.de
обсуждение исходный текст
Ответ на Re: Re: Date of creation and of change  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Date of creation and of change
Следующее
От: hlefebvre
Дата:
Сообщение: Re: Re: Date of creation and of change