From: | "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | Petter Reinholdtsen <pere(at)td(dot)org(dot)uit(dot)no>, pere(at)td(dot)org(dot)uit(dot)no |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] Problems with default date 'now' |
Date: | 1998-06-10 12:50:18 |
Message-ID: | Pine.LNX.3.96.980610124928.3640A-100000@proxy.bazzanese.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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'
From | Date | Subject | |
---|---|---|---|
Next Message | Jackson, DeJuan | 1998-06-10 15:14:44 | RE: [SQL] Problems with default date 'now' |
Previous Message | Herouth Maoz | 1998-06-10 12:09:37 | Re: [SQL] Problems with default date 'now' |