Thread: Timestamp with time zone: why not?

Timestamp with time zone: why not?

From
km@acrasis.net
Date:
Would I be right in thinking that, in general, a column to hold
timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE'
and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'?

To put it another way, for what reasons might the 'TIMESTAMP' type be
preferred to 'TIMESTAMP WITH TIME ZONE'?
--
KM

Re: Timestamp with time zone: why not?

From
Ron Johnson
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/23/07 18:54, km@acrasis.net wrote:
> Would I be right in thinking that, in general, a column to hold
> timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE'
> and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'?
>
> To put it another way, for what reasons might the 'TIMESTAMP' type be
> preferred to 'TIMESTAMP WITH TIME ZONE'?

Importing data from a legacy system that doesn't "do" timezones.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGVR5HS9HxQb37XmcRAilwAJ9JSQEWDNdRUePIP+wXlHBEN0sG8gCg50K5
ccYj7+WkwdL7CkfoOgDEHDs=
=h+pn
-----END PGP SIGNATURE-----

Re: Timestamp with time zone: why not?

From
Rich Shepard
Date:
On Wed, 23 May 2007, km@acrasis.net wrote:

> Would I be right in thinking that, in general, a column to hold timestamp
> values is best created with type 'TIMESTAMP WITH TIME ZONE' and not
> 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'?

   If the application's users are in different time zones, or accurate time
intervals are important, then time zones should be part of the stored data.
If this is not an issue, and will not be an issue, it does not matter.
However, using 'WITH TIME ZONE' in the DDL means that if the situation
changes you are covered.

Rich

--
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.        |          Accelerator(TM)
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

Re: Timestamp with time zone: why not?

From
Scott Marlowe
Date:
km@acrasis.net wrote:
> Would I be right in thinking that, in general, a column to hold
> timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE'
> and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'?
>
> To put it another way, for what reasons might the 'TIMESTAMP' type be
> preferred to 'TIMESTAMP WITH TIME ZONE'?
>
We use the database to store one minute roll up stats from our main
application.  Each of these has a timestamp on it.

There's really no need for timestamptz in this instance.