TIMESTAMP value binary transfer problem

From: Vladimir Crnčić (Infoart d(dot)o(dot)o(dot)) <vcrncic(at)infoart(dot)hr>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: TIMESTAMP value binary transfer problem
Date: 2014-10-22 12:03:22
Message-ID: 001401cfedf0$2d861690$889243b0$@infoart.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

There is a problem with JDBS driver interpretation of "timestamp without
time zone" values when binary transfer is on. When binary transfer is
disabled for TIMESTAMP columns (binaryTransferDisable=TIMESTAMP or
binaryTransfer=false) problem does not occur.

database version: 9.1.1

driver version: 9.2, 9.3

BINARY TRANSFER:

----------------

database value (TIMESTAMP): 2014-10-26 01:00:04

bytes (AbstractJdbc2Resultset): [0, 1, -87, 71, -77, -6, 45, 0]

long value (TimestampUtils): 467600404000000

java timestamp (TimestampUtils): 2014-10-26 02:00:04.0
(not OK)

TEXT TRANSFER:

--------------

database value (TIMESTAMP): 2014-10-26
01:00:04

string value (AbstractJdbc2Resultset): 2014-10-26 01:00:04

java timestamp (TimestampUtils): 2014-10-26
01:00:04.0 (OK)

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2014-10-22 15:24:57 JDBC regression tests broken by latest timezone changes
Previous Message Vitalii Tymchyshyn 2014-10-21 21:48:32 Re: Disk buffering of resultsets