timestamp with time zone - Mailing list pgsql-general

From Tatsuo Ishii
Subject timestamp with time zone
Date
Msg-id 20071213.141045.51691404.t-ishii@sraoss.co.jp
Whole thread Raw
Responses Re: timestamp with time zone
List pgsql-general
Hi,

Can someone enlighten me?

I know that I can insert date/time data along with time zone info into
the timestamp with time zone data type. My question is, can I extract
the *original* time zone info afterward? I seems impossible.

May be I should use date + time with time zone to preserve the time
zone info?

It seems the time with time zone data type can do this.

test=# create table t2(t time with time zone);
CREATE TABLE
test=#
test=# insert into t2 values('12:34:56 +0400');
INSERT 0 1
test=# select * from t2;
      t
-------------
 12:34:56+04
(1 row)

test=# select t at time zone 'jst' from t2;
  timezone
-------------
 17:34:56+09
(1 row)

test=# select t::time from t2;
    t
----------
 12:34:56
(1 row)
--
Tatsuo Ishii
SRA OSS, Inc. Japan

pgsql-general by date:

Previous
From: "John D. Burger"
Date:
Subject: Re: Need LIMIT and ORDER BY for UPDATE
Next
From: Tatsuo Ishii
Date:
Subject: timestamp with time zone