Re: Timestamp output - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: Timestamp output
Date
Msg-id 3C7CE280.50CCB130@fourpalms.org
Whole thread Raw
In response to Re: Timestamp output  ("Robert Treat" <robertt@auctionsolutions.com>)
List pgsql-general
> this should give you a good idea how the new timestamping works, and you'll
> need to change your column data type accordingly. (You probably should
> verify your data entry still works correctly after you do that!)

Right. You can enforce the old two-digit behavior by explicitly defining
your columns to be timestamp(2), by using CURRENT_TIMESTAMP(2), etc.

> The one thing I don't get is that this seems to create fields that are
> "timestamp with timezone"...

That is to assist with upgrades from versions prior to 7.2. To support
the precision syntax, the parser explicitly recognizes TIMESTAMP and
related tokens, and converts TIMESTAMP internally to "timestamptz" and
TIMESTAMP WITHOUT TIME ZONE internally to "timestamp". In future
versions the parser tokens and internal names will line up more like you
would expect, but for this version they do not.

hth

                         - Thomas

pgsql-general by date:

Previous
From: "Steve SAUTETNER"
Date:
Subject: Re: select NULL||'abc' returns empty string (or NULL)
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: atomicity