From: | Edoardo Panfili <edoardopa(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Cc: | "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at> |
Subject: | Re: The same prepared query yield "-1" the first six times and then "-1.0" |
Date: | 2023-08-21 18:21:52 |
Message-ID: | F1538417-A6F2-439E-B0C3-F74B7DDB353E@gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Il giorno 21 ago 2023, alle ore 20:13, Peter J. Holzer <hjp-pgsql(at)hjp(dot)at> ha scritto:
>
> On 2023-08-21 17:27:20 +0200, Edoardo Panfili wrote:
>> The attended result was a sequence of ten equal values but this is the actual result:
>> p: -1
>> p: -1
>> p: -1
>> p: -1
>> p: -1
>> p: -1.0
>> p: -1.0
>> p: -1.0
>> p: -1.0
>> p: -1.0
> [...]
>> 2023-08-21 11:51:50.633 CEST [1511] user(at)testdb LOG: execute <unnamed>: SET extra_float_digits = 3
>> 2023-08-21 11:51:50.634 CEST [1511] user(at)testdb LOG: execute <unnamed>: SET application_name = 'PostgreSQL JDBC Driver'
>> 2023-08-21 11:51:50.644 CEST [1511] user(at)testdb LOG: execute <unnamed>: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.648 CEST [1511] user(at)testdb LOG: execute <unnamed>: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.649 CEST [1511] user(at)testdb LOG: execute <unnamed>: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.650 CEST [1511] user(at)testdb LOG: execute <unnamed>: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.651 CEST [1511] user(at)testdb LOG: execute S_1: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.651 CEST [1511] user(at)testdb LOG: execute S_1: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.653 CEST [1511] user(at)testdb LOG: execute S_1: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.653 CEST [1511] user(at)testdb LOG: execute S_1: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.654 CEST [1511] user(at)testdb LOG: execute S_1: SELECT dim1 FROM number WHERE name='first'
>> 2023-08-21 11:51:50.656 CEST [1511] user(at)testdb LOG: execute S_1: SELECT dim1 FROM number WHERE name=‘first'
>
> Are these outputs from the same run?
Yes
>
> I notice that the output from the program switches after 5 queries from
> "-1" to "-1-0", but the logged query name switches after 4 queries from
> "<unnamed>" to "S_1”.
You’re right. It seem a JDBC side problem. I am doing some tests using suggestions from pgsql-jdbc list.
What sounds strange to me is that switching from “mode_X” to “mode_Y” I obtain different representation of the same value,
I know the value is semantically the same.. but… in some way I like to see.. "a perfect postgresql env” (as it absolutely is)
Edoardo
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2023-08-21 18:51:06 | Re: JDBC + PG-15 but not psql |
Previous 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" |