From: Jose' Soares Da Silva <sferac@bo.nettuno.it>
To: Petter Reinholdtsen <pere@td.org.uit.no>
To: pere@td.org.uit.no
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Problems with default date 'now'
Date: Wed, 10 Jun 1998 12:50:18 +0000 (UTC)
Message-ID: <Pine.LNX.3.96.980610124928.3640A-100000@proxy.bazzanese.com> (raw)
In-Reply-To: <199806091619.SAA10905@sleeper.games.no>
On Tue, 9 Jun 1998, Petter Reinholdtsen wrote:
>
> I have a table where I want the default value of a date field to be
> todays date when I do insert. I have this table definition:
>
> CREATE TABLE testdate(
> received date DEFAULT 'now',
> info text NOT NULL
> );
>
CREATE TABLE testdate(
received date DEFAULT CURRENT_DATE,
info text NOT NULL
);
> The problem is that the 'now' apparently is substituted when I create
> the table, not when I insert into it. Is there another way to handle
> this? This is on Linux RedHat 5.0 with PostgreSQL 6.2.1.
>
Jose'
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: sferac@bo.nettuno.it, pere@td.org.uit.no
Subject: Re: [SQL] Problems with default date 'now'
In-Reply-To: <Pine.LNX.3.96.980610124928.3640A-100000@proxy.bazzanese.com>
References: <199806091619.SAA10905@sleeper.games.no> <Pine.LNX.3.96.980610124928.3640A-100000@proxy.bazzanese.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