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

From Rob Sargent
Subject Re: The same prepared query yield "-1" the first six times and then "-1.0"
Date
Msg-id c527d58f-29f5-1696-997e-9cfa4b1b5273@gmail.com
Whole thread Raw
In response to Re: The same prepared query yield "-1" the first six times and then "-1.0"  (Edoardo Panfili <edoardo.panfili@iisgubbio.edu.it>)
List 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

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0"
Next
From: "Peter J. Holzer"
Date:
Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0"