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

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: [BUGS] BUG #1523: precision column value returned from
Дата
Msg-id 42320A01.2080102@opencloud.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #1523: precision column value returned from  (Sergio Lob <Sergio_Lob@iwaysoftware.com>)
Список 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 по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: [GENERAL] MS Access to PostgreSQL
Следующее
От: "Prasanth"
Дата:
Сообщение: Re: Crystal Reports: Connection rejected: FATAL: no