From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0"
Date: Mon, 21 Aug 2023 12:04:15 -0600
Message-ID: <c527d58f-29f5-1696-997e-9cfa4b1b5273@gmail.com> (raw)
In-Reply-To: <D22FEEC1-17CE-4093-A201-EF1D76687279@gmail.com>
References: <5C40B9CC-40E4-4AC5-95A1-E5A521C282EF@gmail.com>
<CAKFQuwZzVWzxpcbeJsS2ZSBCi1j310B+N=5v-9roObQaq2dVEQ@mail.gmail.com>
<D22FEEC1-17CE-4093-A201-EF1D76687279@gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com
Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0"
In-Reply-To: <c527d58f-29f5-1696-997e-9cfa4b1b5273@gmail.com>
References: <5C40B9CC-40E4-4AC5-95A1-E5A521C282EF@gmail.com> <CAKFQuwZzVWzxpcbeJsS2ZSBCi1j310B+N=5v-9roObQaq2dVEQ@mail.gmail.com> <D22FEEC1-17CE-4093-A201-EF1D76687279@gmail.com> <c527d58f-29f5-1696-997e-9cfa4b1b5273@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox