Re: [BUGS] BUG #1523: precision column value returned from

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Sergio_Lob(at)iwaysoftware(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org, Ephraim_Spravtsev(at)iwaysoftware(dot)com
Subject: Re: [BUGS] BUG #1523: precision column value returned from
Date: 2005-03-11 21:13:37
Message-ID: 42320A01.2080102@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2005-03-11 21:48:32 Re: odd initdb.exe failure on windows
Previous Message Steve McWilliams 2005-03-11 20:53:59 odd initdb.exe failure on windows

Browse pgsql-jdbc by date

  From Date Subject
Next Message Prasanth 2005-03-11 21:21:41 Re: Crystal Reports: Connection rejected: FATAL: no
Previous Message Brian Gunning 2005-03-11 17:52:28 Re: [JDBC] MS Access to PostgreSQL