Re: Problem with DATE

Поиск
Список
Период
Сортировка
От Lachezar Dobrev
Тема Re: Problem with DATE
Дата
Msg-id CA+xsaB2b_fzVjnEyZGZghjfBbWe5=NppXK0ObsGU-tJs+3PDpQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problem with DATE  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
  This does not seem to be true.

  Quote: AbstractJdbc2Connection:194-199

  /*
   * Does not pass unit tests because unit tests expect setDate to have
   * millisecond accuracy whereas the binary transfer only supports
   * date accuracy.
   */
  useBinarySendForOids.remove(Oid.DATE);

  And if the date is not sent in binary form, then it is sent as UNSPECIFIED:
  Quote: AbstractJdbc2Statement:3319

  bindString(i, connection.getTimestampUtils().toString(cal, d),
Oid.UNSPECIFIED);



2015-01-13 13:45 GMT+02:00 Dave Cramer <pg@fastcrypt.com>:
> No there is no similar problem for Date as there is only one date type in
> postgresql. If all you need is date then you should able to use that
>
> Dave Cramer
>
> dave.cramer(at)credativ(dot)ca
> http://www.credativ.ca
>
> On 13 January 2015 at 01:42, Vinayak <vinpokale@gmail.com> wrote:
>>
>> Hi,
>>
>> I have checked the below description in one post:
>> If the timestamp parameter is given, the jdbc does not know if it is to be
>> used timestamp or timestamptz. The jdbc driver passes it to the server as
>> an
>> unknown data type letting the server figure out what to do with it.
>> Example:
>> timestampcol = ? or if you're inserting into a timestamp field so the
>> server
>> can determine the datatype of parameter being used at, in this case since
>> its just being sent back to the user the server cannot determine the data
>> type.
>> so we need to typecast it.
>> "SELECT ?::timestamp"
>>
>> Is the same problem for date type also?
>>
>>
>>
>>
>> -----
>> Regards,
>> Vinayak,
>>
>> --
>> View this message in context:
>> http://postgresql.nabble.com/Problem-with-DATE-tp5833008p5833708.html
>> Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
>>
>>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc
>
>


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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Problem with DATE
Следующее
От: Vinayak
Дата:
Сообщение: Re: Problem with DATE