Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Дата
Msg-id CAKFQuwbbYTc63HeEBPXcDzPU28Do4z+y9ZEwQKVFwCnbPP1FaQ@mail.gmail.com
обсуждение исходный текст
Ответ на RE: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue  (Andreas Joseph Krogh <andreas@visena.com>)
Ответы Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue  (Andreas Joseph Krogh <andreas@visena.com>)
Список pgsql-jdbc
On Mon, Oct 19, 2020 at 11:46 PM Andreas Joseph Krogh <andreas@visena.com> wrote:
På tirsdag 20. oktober 2020 kl. 08:43:55, skrev Thangavel, Parameswaran <Parameswaran.Thangavel@rsa.com>:

When I run the select statement, I am getting different data…

I suggest you use the native "psql"-client and chech the results from that first.

Specifically this behavior can be readily observed using the following query:

SELECT '1.234567+e06'::float4::numeric;

As I mentioned in the original -bugs report for this issue [1] I don't know whether the above is correct or not.  What I can say is the regression demonstrated in the example Java program could be readily avoided by not passing around floating point values when the database storage is numeric.

Since the confusing behavior can be shown using just PostgreSQL the original bug report suffices as a place to get the final explanation as to what is going on here.

David J.


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

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: RE: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue