Re: [GENERAL] default date - Mailing list pgsql-general

From Sferacarta Software
Subject Re: [GENERAL] default date
Date
Msg-id 5621.980804@bo.nettuno.it
Whole thread Raw
In response to default date  ("Krasnow, Greg" <gak@hnc.com>)
List pgsql-general
Hello Krasnow,,

lunedì, 3 agosto 98, you wrote:

KG> How can I create a table which has a date field and have the date field
KG> default to the system time when the record is inserted... like Oracle's DATE
KG> DEFAULT SYSDATE?  Thanks.

KG> - Greg


KG> Greg Krasnow
KG> HNC Software Inc.
KG> Financial Solutions Group
KG> Senior Software Engineer
KG> Email: gak@hnc.com
KG> Direct Phone: 619.799.8341
KG> Fax: 619.799.8036

SYSDATE?? What do you think about CURRENT_DATE? This is SQL standard.

example:

CREATE TABLE mytable (
       mkey  INTEGER,
       mdate DATE DEFAULT CURRENT_DATE
       );


Best regards,
    Jose'                            mailto:sferac@bo.nettuno.it



pgsql-general by date:

Previous
From: The Hermit Hacker
Date:
Subject: CD Distribution/Rates changed...
Next
From: "Krasnow, Greg"
Date:
Subject: float8 type