Re: [SQL] 'now - 4 hours ago' ? - Mailing list pgsql-sql

From Zsolt Varga
Subject Re: [SQL] 'now - 4 hours ago' ?
Date
Msg-id Pine.LNX.3.96.980619080816.31358A-100000@lupus.agria.hu
Whole thread Raw
In response to 'now - 4 hours ago' ?  (Petter Reinholdtsen <pere@hungry.com>)
List pgsql-sql
On Thu, 18 Jun 1998, Petter Reinholdtsen wrote:

|  CREATE TABLE testdate(
|       received timestamp DEFAULT CURRENT_DATE,
|       info text NOT NULL
|       );

I think CURRENT_DATE will be parsed to the table creation's time.
so better to use:

    CREATE TABLE testdate (
        received timestamp DEFAULT timestamp(now()),
        info     text      NOT NULL
        );

    Redax

.----------------------------------------------------------.
|Zsolt Varga            | tel/fax:   +36 36 422811         |
| AgriaComputer LTD     | email:     redax@agria.hu        |
| System Administrator  | URL:       http://www.agria.hu/  |
`----------------------------------------------------------'


pgsql-sql by date:

Previous
From: "William D. McCoy"
Date:
Subject: converting float4 to float8
Next
From: Marin D
Date:
Subject: Re: [SQL] FOREIGN KEY ...