From: Bryan White <bryan@arcamax.com>
To: pgsql-sql@hub.org
Subject: Setting current time on insert
Date: Mon, 28 Sep 1998 10:50:27 -0400
Message-ID: <00a401bdeaef$54d265c0$a3f0f6ce@bryan.arcamax.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: bryan@arcamax.com, pgsql-sql@hub.org
Subject: Re: Setting current time on insert
In-Reply-To: <00a401bdeaef$54d265c0$a3f0f6ce@bryan.arcamax.com>
References: <00a401bdeaef$54d265c0$a3f0f6ce@bryan.arcamax.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox