Received: from proxy.bazzanese.com (root@ip179.tol11.interbusiness.it [195.120.106.179]) by hub.org (8.8.8/8.7.5) with ESMTP id HAA09749 for ; Wed, 10 Jun 1998 07:33:39 -0400 (EDT) Received: from localhost (sferac@localhost) by proxy.bazzanese.com (8.8.8/8.8.8/Debian/GNU) with SMTP id MAA03662; Wed, 10 Jun 1998 12:50:18 GMT Date: Wed, 10 Jun 1998 12:50:18 +0000 (UTC) From: "Jose' Soares Da Silva" X-Sender: sferac@proxy.bazzanese.com To: Petter Reinholdtsen , pere@td.org.uit.no cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Problems with default date 'now' In-Reply-To: <199806091619.SAA10905@sleeper.games.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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'