pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Sergio_Lob@iwaysoftware.com
Cc: pgsql-jdbc@postgresql.org
Cc: Ephraim_Spravtsev@iwaysoftware.com
Subject: Re: [BUGS] BUG #1523: precision column value returned from
Date: Fri, 11 Mar 2005 21:13:37 +0000
Message-ID: <42320A01.2080102@opencloud.com> (raw)
In-Reply-To: <4231B1A3.4050304@iwaysoftware.com>
References: <422F6641.6030806@opencloud.com>
	<4231B1A3.4050304@iwaysoftware.com>

Sergio Lob wrote:

> By default, retrieving TIMESTAMP WITH TIME ZONE values as a timestamp 
> (using resultSet.getTimeStamp, for example) is not supported because the 
> time zone information stored in the database would be lost when the data 
> is converted to a timestamp. To provide backward compatibility with 
> existing applications, you can use the FetchTSWTZasTimestamp property to 
> allow TIMESTAMP WITH TIME ZONE values to be retrieved as a timestamp. 
> The default value of the FetchTSWTSasTimestamp property is false, which 
> disables retrieving TIMESTAMP WITH TIME ZONE values as timestamps."

The current PostgreSQL driver allows retrieving it as either a String or 
a Timestamp -- application's choice. I don't see much value in an option 
to enable/disable retrieving it as a Timestamp TBH.

> Oracle recognizes that the JDBC timestamp data type does not allow for 
> timezones, thus they would map PostgresSQL timestamptz type to JDBC type 
> varchar, not timestamp.

They actually do this?

I'd map it to timestamp at a lower preference (later in the resultset); 
TIMESTAMP WITH TIME ZONE is closer to a TIMESTAMP than to a VARCHAR..

-O



view thread (12+ messages)

Message-ID: <42320A01.2080102@opencloud.com>
Permalink:  ../42320A01.2080102@opencloud.com/
Also on:    postgresql.org/message-id/42320A01.2080102@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, Sergio_Lob@iwaysoftware.com, Ephraim_Spravtsev@iwaysoftware.com
  Subject: Re: [BUGS] BUG #1523: precision column value returned from
  In-Reply-To: <42320A01.2080102@opencloud.com>
  References: <422F6641.6030806@opencloud.com> <4231B1A3.4050304@iwaysoftware.com> <42320A01.2080102@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox