Re: Problem in ResultSet#getTimestamp() of 7.2b4

Поиск
Список
Период
Сортировка
От Thomas O'Dowd
Тема Re: Problem in ResultSet#getTimestamp() of 7.2b4
Дата
Msg-id 20020117225708.R8130@beast.uwillsee.com
обсуждение исходный текст
Ответ на Re: Problem in ResultSet#getTimestamp() of 7.2b4  (Ryouichi Matsuda <r-matuda@sra.co.jp>)
Ответы Re: Problem in ResultSet#getTimestamp() of 7.2b4  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Problem in ResultSet#getTimestamp() of 7.2b4  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Problem in ResultSet#getTimestamp() of 7.2b4  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-jdbc
Hi Matsuda-san,

You beat me too it :) The following is a similar patch to the same code.
I've tested it with your GetTimestampTest.java code and it looks good
from what I can see. I'm attaching both jdbc1 and jdbc2 patches. This
patch changes a bit less in the code and basically adds a check to the
fraction loop for the end of string, as well as a check for a tz before
adding the GMT bit.

Tom.

On Thu, Jan 17, 2002 at 08:00:01PM +0900, Ryouichi Matsuda wrote:
> Barry Lind wrote:
> > Then however I did try your last query:
> >
> > select 'now'::timestamp without time zone;
> >
> > and this does fail for me with the string index out of bounds exception.
>
> An attached patch corrects problem of this bug and fractional second.
>
>
> The handling of time zone was as follows:
>
>   (a) with time zone
>       using  SimpleDateFormat("yyyy-MM-dd HH:mm:ss z")
>   (b) without time zone
>       using  SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
>
>
> About problem of fractional second,
> Fractional second was changed from milli-second to nano-second.

--
Thomas O'Dowd. - Nooping - http://nooper.com
tom@nooper.com - Testing - http://nooper.co.jp/labs

Вложения

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

Предыдущее
От: Ryouichi Matsuda
Дата:
Сообщение: Re: Problem in ResultSet#getTimestamp() of 7.2b4
Следующее
От: Barry Lind
Дата:
Сообщение: Re: setBoolean and char/varchar