Setting current time on insert

Поиск
Список
Период
Сортировка
От Bryan White
Тема Setting current time on insert
Дата
Msg-id 00a401bdeaef$54d265c0$a3f0f6ce@bryan.arcamax.com
обсуждение исходный текст
Список pgsql-sql
I have a table with a column defined as:
    Date timestamp not null default 'now'
The intent was to set the field to the data/time the row was created.  The
result seems to be that 'now' is evaluated when the table is created and all
records get this value.  Is there a way to defer evaluation of the column
default until a record is inserted?


Bryan White
ArcaMax Inc.
Yorktown VA
www.arcamax.com


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Another nut to crack with insertion into tables... *sigh*
Следующее
От: Herouth Maoz
Дата:
Сообщение: Re: [SQL] Re: Another nut to crack with insertion into tables... *sigh*