From: | Petter Reinholdtsen <pere(at)td(dot)org(dot)uit(dot)no> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Problems with default date 'now' |
Date: | 1998-06-09 16:19:49 |
Message-ID: | 199806091619.SAA10905@sleeper.games.no |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
);
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.
Please remember to send replies to me (too), as I am not member on
this mailing-list.
Happy hacking,
--
##> Petter Reinholdtsen <## | pere(at)td(dot)org(dot)uit(dot)no
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/ | Go Mozilla, go! Go!
From | Date | Subject | |
---|---|---|---|
Next Message | Jerome ALET | 1998-06-10 06:49:59 | Re: [SQL] Problems with default date 'now' |
Previous Message | Jose' Soares Da Silva | 1998-06-09 16:09:09 | Re: [SQL] text concat in WHERE? |