Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #131

Re: Timestamp with Timezone (Oracle versus Postgres)

From Jasen Betts <jasen@xnet.co.nz>
Newsgroups comp.databases.postgresql
Subject Re: Timestamp with Timezone (Oracle versus Postgres)
Date 2011-06-12 10:32 +0000
Organization Dis (not Dat) Organisation
Message-ID <it24jf$63e$1@reversiblemaps.ath.cx> (permalink)
References <77db128d-ae4c-4ab9-ad2d-62b2e885d48b@r27g2000prr.googlegroups.com>

Show all headers | View raw


On 2011-06-10, vinu <vinu.rm@gmail.com> wrote:
> Is timestamp with timezone a ANSI SQL (or some other) standard data
> type ? 

yes, there are rules about how it behaves and as I understand it 
postgres mets all the requirements.

> I noticing a difference in the way it is implemented in
> Postgresql and Oracle. In Oracle it is possible to know the timezone
> with which the data is inserted into the table (which is the usecase
> of the data type i feel). See example (http://www.databasejournal.com/
> features/oracle/article.php/3072991/Oracle-Time-Zone.htm)

oracle displays the timezone offset, which is not the same thing as
the timezone,

> In postgresql when you insert a record, the data is converted to UTC
> and stored. When I select the record later on it shows the timestamp
> converted to the session timezone. There is no way to know that
> originally with what timezone the data was inserted in to the table.

> In this an issue with postgresql or a conscious implementation
> decision?

as far as I can tell is was a conscious decision.

> Is there an option to view the timezone with which the
> timestamp is originally stored in the table at a later point of time
> with having to add one additional column for that purpose ?

no. you need an extra column.

-- 
⚂⚃ 100% natural

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Timestamp with Timezone (Oracle versus Postgres) vinu <vinu.rm@gmail.com> - 2011-06-10 03:30 -0700
  Re: Timestamp with Timezone (Oracle versus Postgres) Mladen Gogala <gogala.mladen@gmail.com> - 2011-06-10 13:39 +0000
  Re: Timestamp with Timezone (Oracle versus Postgres) Jasen Betts <jasen@xnet.co.nz> - 2011-06-12 10:32 +0000
    Re: Timestamp with Timezone (Oracle versus Postgres) "Laurenz Albe" <invite@spam.to.invalid> - 2011-06-14 11:43 +0200

csiph-web