From: Edoardo Panfili <edoardo.panfili@iisgubbio.edu.it>
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 19:17:59 +0200
Message-ID: <D22FEEC1-17CE-4093-A201-EF1D76687279@gmail.com> (raw)
In-Reply-To: <CAKFQuwZzVWzxpcbeJsS2ZSBCi1j310B+N=5v-9roObQaq2dVEQ@mail.gmail.com>
References: <5C40B9CC-40E4-4AC5-95A1-E5A521C282EF@gmail.com>
<CAKFQuwZzVWzxpcbeJsS2ZSBCi1j310B+N=5v-9roObQaq2dVEQ@mail.gmail.com>
> Il giorno 21 ago 2023, alle ore 17:50, David G. Johnston <david.g.johnston@gmail.com> ha scritto:
>
>
> On Mon, Aug 21, 2023 at 8:28 AM Edoardo Panfili <edoardo.panfili@iisgubbio.edu.it <mailto:edoardo.panfili@iisgubbio.edu.it>> wrote:
>>
>> dim1 real DEFAULT '-1' NOT NULL
>>
>> System.out.print("p: "+rs.getString("dim1")+"\n”);
>>
>> Can I do something to avoid this problem?
>
> 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
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: edoardo.panfili@iisgubbio.edu.it
Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0"
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>
* 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