Re: [BUGS] BUG #1523: precision column value returned from - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: [BUGS] BUG #1523: precision column value returned from
Date
Msg-id 42320A01.2080102@opencloud.com
Whole thread Raw
In response to Re: [BUGS] BUG #1523: precision column value returned from  (Sergio Lob <Sergio_Lob@iwaysoftware.com>)
List 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

pgsql-jdbc by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: [GENERAL] MS Access to PostgreSQL
Next
From: "Prasanth"
Date:
Subject: Re: Crystal Reports: Connection rejected: FATAL: no