Re: Understanding TIMESTAMP WITH TIME ZONE

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Robert James <srobertjames(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Understanding TIMESTAMP WITH TIME ZONE
Date: 2013-01-18 17:39:08
Message-ID: 50F988BC.7070009@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/18/2013 09:31 AM, Robert James wrote:
> I'd like to better understand TIMESTAMP WITH TIME ZONE.
>
> My understanding is that, contrary to what the name sounds like, the
> time zone is never stored. It simply stores a UTC timestamp,
> identical to what TIMESTAMP WITHOUT TIME ZONE stores.
>
> And then the only difference is that WITH TIME ZONE will allow you to
> specify an offset in a literal value when INSERTing or UPDATEing ?
> That sounds to me like a conversion or function - why is that a
> different data type?

Probably for the same reason char and varchar are. They both just store
a string but in one the string is padded in the other it is not.
Basically WITH TIME ZONE tells Postgres that the field is time zone aware.

>
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alex Hunsaker 2013-01-18 18:30:59 Re: Case insensitive collation
Previous Message Pavel Stehule 2013-01-18 17:33:50 Re: Temp table's effect on performance