Re: timestamp

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Brian Ward <brian0(at)verizon(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: timestamp
Date: 2002-10-07 12:25:08
Message-ID: 1033993509.311.17.camel@lerlaptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sun, 2002-10-06 at 09:41, Brian Ward wrote:
> How do I create a time stamp column in a table that default to the current
> time
> when a row is inserted?
> I tried putting in now() as the default but I have something wrong
> with the syntax or something I think
> Any one have an example of a table creation script that has a timestamp
> column?
"comment_timestamp" timestamp(0) with time zone DEFAULT now()

that's a live one from a table I have.

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

  • timestamp at 2002-10-06 14:41:36 from Brian Ward

Browse pgsql-sql by date

  From Date Subject
Next Message Dan Langille 2002-10-07 12:27:20 Re: Need some SQL help
Previous Message Michael Contzen 2002-10-07 12:21:04 Re: How slow is distinct - 2nd