Setting current time on insert - Mailing list pgsql-sql

From Bryan White
Subject Setting current time on insert
Date
Msg-id 00a401bdeaef$54d265c0$a3f0f6ce@bryan.arcamax.com
Whole thread Raw
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Another nut to crack with insertion into tables... *sigh*
Next
From: Herouth Maoz
Date:
Subject: Re: [SQL] Re: Another nut to crack with insertion into tables... *sigh*