pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Raymond Chui <raymond.chui@noaa.gov>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: [SQL] CURRENT_TIMSTAMP
Date: Mon, 2 Dec 2002 13:27:36 -0800 (PST)
Message-ID: <20021202132429.A57292-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3DEB8D3D.5353D375@noaa.gov>

On Mon, 2 Dec 2002, Raymond Chui wrote:

> I created a column, dada type timstamp with time zone
> and with default CURRENT_TIMSTAMP
> it shows me the default is
>
> default ('now'::text)::timstamp(6) with time zone
>
> Then when I insert a row, the default timestamp value is
>
> yyyy-mm-dd HH:MM:ss.mmmmm+00
>
> where mmmmm is milliseconds.
> How do I make default only yyyy-mm-dd HH:MM:ss+00 ?

As already suggested you probably want a timestamp with time zone(0)
column, but if you really want the ability to insert partial seconds but
the default to not have partial seconds, you can use
CURRENT_TIMESTAMP(0) I believe.





view thread (3+ messages)

Message-ID: <20021202132429.A57292-100000@megazone23.bigpanda.com>
Permalink:  ../20021202132429.A57292-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20021202132429.A57292-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, raymond.chui@noaa.gov, pgsql-general@postgresql.org, pgsql-admin@postgresql.org
  Subject: Re: [SQL] CURRENT_TIMSTAMP
  In-Reply-To: <20021202132429.A57292-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox