Re: three timestamps/table, use of 'now' in table creation statement

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Dennis Gearon <gearond(at)cvc(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: three timestamps/table, use of 'now' in table creation statement
Date: 2003-01-16 20:48:06
Message-ID: 20030116204806.GA27659@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Note you seem to have forgotten to cc the list on this message.

On Thu, Jan 16, 2003 at 09:42:10 -0800,
Dennis Gearon <gearond(at)cvc(dot)net> wrote:
> Thank you for all the replies, I now have half of my question answered. What I need to know is
> what I can put in the table definition for the default value to have the current timestamp put in
> the three timestamp fields.
>
> 1/ Can I put 'now' as the default value
> in the table definition?
>
> 2/ can I put CURRENT_TIMESTAMP(0) as the default value ...
> in the table definition?

I believe both of these will work. If the column is of type timestamp
(as opposed to timestamp(0)) then 'now''s value won't be rounded to
the nearest second.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-01-16 21:00:44 Re: three timestamps/table, use of 'now' in table creation statement
Previous Message Orr, Steve 2003-01-16 20:17:46 Re: Server error and deadlocks