Re: Change of format of returned flat value after prepareThreshold - Mailing list pgsql-jdbc

From Vladimir Sitnikov
Subject Re: Change of format of returned flat value after prepareThreshold
Date
Msg-id CAB=Je-H_Q0ezjcBM9gCta=wVZyUKs+7WExwKRuJRdhssq9B8Bg@mail.gmail.com
Whole thread Raw
In response to Change of format of returned flat value after prepareThreshold  (Michał Niklas <michal.niklas@heuthes.pl>)
Responses Re: Change of format of returned flat value after prepareThreshold
List pgsql-jdbc
>but I think that those numbers can be returned as large integers just like it was with 9.3 drivers or just like it is

I'm afraid it is not possible at jdbc driver level.
You need to change application code.

As far as I can see from your output, backend reports float8.
That means, we have just a "double" at the client side, and we have no
idea what string representation is "expected".

If you want a "epoch time", I would recommend using resultSet.getLong().
Additionally, you might want to cast the selected expression to int8,
so you do not mess with floating point numerics.

Is there a specific reason why you expect non-scientific output of a
_floating_ value out of .getString()?

Vladimir


pgsql-jdbc by date:

Previous
From: Michał Niklas
Date:
Subject: Change of format of returned flat value after prepareThreshold
Next
From: Dave Cramer
Date:
Subject: Re: Release 1204 released