Re: The same prepared query yield "-1" the first six times and then "-1.0"

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0"
Date: 2023-08-21 18:04:15
Message-ID: c527d58f-29f5-1696-997e-9cfa4b1b5273@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/21/23 11:17, Edoardo Panfili wrote:
>> Use the type appropriate getter, not getString, to retrieve the value
>> of the underlying real typed column.
> I know, but in this occasion I need to use text value.
>
>>
>> Otherwise, I agree this seems like a bug, probably in the JDBC
>> driver, though one pertains to style as opposed to semantics since
>> both answers are technically correct.
> I will try, thank you
>
> Edoardo
>
You appear to have two code paths in your application.  The one that
needs the string version of the answer should do the conversion of the
numeric value.
rjs

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2023-08-21 18:13:20 Re: The same prepared query yield "-1" the first six times and then "-1.0"
Previous Message Pavel Stehule 2023-08-21 18:00:23 Re: The same prepared query yield "-1" the first six times and then "-1.0"