Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qY9XW-000v0u-C3 for pgsql-general@arkaria.postgresql.org; Mon, 21 Aug 2023 18:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qY9XV-009a0q-9G for pgsql-general@arkaria.postgresql.org; Mon, 21 Aug 2023 18:22:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qY9XU-009a0f-UD for pgsql-general@lists.postgresql.org; Mon, 21 Aug 2023 18:22:08 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qY9XS-000DYZ-40 for pgsql-general@lists.postgresql.org; Mon, 21 Aug 2023 18:22:08 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4ffa248263cso5539758e87.2 for ; Mon, 21 Aug 2023 11:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692642125; x=1693246925; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Z4xcGrZTC39uFIEDL4XTMC1OuGm1QGm/HWVq+mQmydY=; b=Tk4KnKtxoQg90JskQ/+Jh+e3w+30OcgNo0On05Zlu6DjKn++4YtXBR+30ZtFV+Ky0o q/masXXq6GifdE/rlYhEQ9+IWVidMdGg0d/vw3DNdjqodsBJzhWS6iBQsumHVKF4Pa2Y Fpjp5eRENPcJTODFMPeSMxhfYkIvmPxvLXy1deDzyHglEw0PaOJRB1XbYG3Ln38VfXN9 VWrlSYqpNpabY8BGagcuKxQbQNJcPEdofGS3RURtIF4g+76U74aduYBWVR5f6urQCbPz 2G/Z2GgSRmbTWVhuoCX8kXfYl51pQ9H/iam+5msOyriwuQ/iwYb2VOU2TNhlxrFeeHfF dPtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692642125; x=1693246925; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z4xcGrZTC39uFIEDL4XTMC1OuGm1QGm/HWVq+mQmydY=; b=f+a72OtLcUEHLYl0u9E+czWPLzh5rlCZz4YDpg4sO2HIK4yf8T5yctm8qp+OE7MtQA lgaJq4JLkFSAOhpMW3f/XCc7LkPAniCBbeNIRX2BJcPWzM2gMvJhpt66+7F8x9CQL6CU PXeUsSuBHUu6ctRwBV2fMB9IMKroSEsurh3MAc2Syix4GnF2oAqbCP+pOitqypX4hbtK PggxtxfFKZW3ZktxdjDS3/phTSGaKd/2EDctmXcWqpxqRjrtRhwViY5Q2ob8ngzywoRo wTVwq5H8KbIgXWRk1az711se5mD8EjdCSauE8PP+eGhckyZoOncYTu0rdb6QuHpPFu+H bFPg== X-Gm-Message-State: AOJu0YyxV4rbEJIvHYS2G/SLne9a7W+WxsSWGarIoiKUkoAux7wB137d pTtvCqrusFPqwVZg89yZOiGVWXVQM5Y= X-Google-Smtp-Source: AGHT+IGwbBw39u4j8qIrGIm66r1IXq2IQp7LcxTgwP+V8nq4SxMpzLZBlQJvDKMGVSUHnKgRnip0OQ== X-Received: by 2002:ac2:5b5c:0:b0:4fe:746:63d1 with SMTP id i28-20020ac25b5c000000b004fe074663d1mr4551554lfp.5.1692642124444; Mon, 21 Aug 2023 11:22:04 -0700 (PDT) Received: from smtpclient.apple (host-79-47-189-141.retail.telecomitalia.it. [79.47.189.141]) by smtp.gmail.com with ESMTPSA id t11-20020a056402020b00b005236b47116asm6379610edv.70.2023.08.21.11.22.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Aug 2023 11:22:03 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: The same prepared query yield "-1" the first six times and then "-1.0" From: Edoardo Panfili In-Reply-To: <20230821181320.7wp52a747s5sehgu@hjp.at> Date: Mon, 21 Aug 2023 20:21:52 +0200 Cc: "Peter J. Holzer" Content-Transfer-Encoding: quoted-printable Message-Id: References: <5C40B9CC-40E4-4AC5-95A1-E5A521C282EF@gmail.com> <20230821181320.7wp52a747s5sehgu@hjp.at> To: pgsql-general@lists.postgresql.org X-Mailer: Apple Mail (2.3731.600.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Il giorno 21 ago 2023, alle ore 20:13, Peter J. Holzer = ha scritto: >=20 > 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@testdb LOG: execute = : SET extra_float_digits =3D 3 >> 2023-08-21 11:51:50.634 CEST [1511] user@testdb LOG: execute = : SET application_name =3D 'PostgreSQL JDBC Driver' >> 2023-08-21 11:51:50.644 CEST [1511] user@testdb LOG: execute = : SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.648 CEST [1511] user@testdb LOG: execute = : SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.649 CEST [1511] user@testdb LOG: execute = : SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.650 CEST [1511] user@testdb LOG: execute = : SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.651 CEST [1511] user@testdb LOG: execute S_1: = SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.651 CEST [1511] user@testdb LOG: execute S_1: = SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.653 CEST [1511] user@testdb LOG: execute S_1: = SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.653 CEST [1511] user@testdb LOG: execute S_1: = SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.654 CEST [1511] user@testdb LOG: execute S_1: = SELECT dim1 FROM number WHERE name=3D'first' >> 2023-08-21 11:51:50.656 CEST [1511] user@testdb LOG: execute S_1: = SELECT dim1 FROM number WHERE name=3D=E2=80=98first' >=20 > Are these outputs from the same run? Yes >=20 > 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 > "" to "S_1=E2=80=9D. You=E2=80=99re 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 =E2=80=9Cmode_X=E2=80=9D = to =E2=80=9Cmode_Y=E2=80=9D I obtain different representation of the = same value, I know the value is semantically the same.. but=E2=80=A6 in some way I = like to see.. "a perfect postgresql env=E2=80=9D (as it absolutely is) Edoardo