Re: Bug in JDBC-Driver?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug in JDBC-Driver?
Дата
Msg-id 28459.1103350891@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug in JDBC-Driver?  (Kris Jurka <books@ejurka.com>)
Ответы Re: Bug in JDBC-Driver?
Re: Bug in JDBC-Driver?
Список pgsql-jdbc
Kris Jurka <books@ejurka.com> writes:
> The second approach forces the server timezone to be the JVM's via the
> pseudo sql/java:

> SET TIMEZONE = java.util.TimeZone.getDefault().getID();

> This is a little more intrusive on the server side, but it should not be
> visible using standard JDBC calls for date and time information.  The
> attached patch implements this and I plan to apply it unless someone has a
> better idea or a reason it won't work.

The really serious problem with this is the assumption that the server
has the same set of available timezones (and spellings of same) as the
client does.

I'm not sure that there is a better alternative, mind you.  Just
pointing out that the emperor doesn't really have any clothes on.

In 8.0 and later you can presume that the server is following the
zic database's set of timezone names, but I dunno whether that has
anything to do with the Java universe.  Pre-8.0, you'd be foolish
to assume much of anything.

It's not quite too late to make TimeZone be one of the GUC_REPORT
settings in 8.0, if that would help your problem.

            regards, tom lane

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Bug in JDBC-Driver?
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Bug in JDBC-Driver?