From a.mantzios@cloud.gatewaynet.com Fri Jul 3 22:27:48 2026 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 1qlA9O-001XjL-1Q for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Sep 2023 15:39:02 +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 1qlA9M-00D01O-G6 for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Sep 2023 15:39:00 +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 1qlA9M-00D01A-7X for pgsql-jdbc@lists.postgresql.org; Tue, 26 Sep 2023 15:39:00 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlA9J-007hw6-Jp for pgsql-jdbc@postgresql.org; Tue, 26 Sep 2023 15:38:59 +0000 Content-Type: multipart/alternative; boundary="------------pZ0PfT0sNoQj8yE4Tv4ULHOl" Message-ID: Date: Tue, 26 Sep 2023 18:38:55 +0300 MIME-Version: 1.0 Content-Language: en-US To: pgsql-jdbc@postgresql.org From: Achilleas Mantzios - cloud Subject: Regarding useObjects List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------pZ0PfT0sNoQj8yE4Tv4ULHOl Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Dear All I see support for useObjects was dropped some time in 2020, with this commit : 529e5dc3a8f071ad4946daf3bde1422c21a99524 . Desperate mode question : was it replaced by smth else ? Any workaround ? Serious mode question : Since eventually we'll have to bite the bullet and do an upgrade, how would you propose dealing with 1000s lines of java code using arrays of primitives ? thank you --------------pZ0PfT0sNoQj8yE4Tv4ULHOl Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Dear All

I see support for useObjects was dropped some time in 2020, with this commit : 529e5dc3a8f071ad4946daf3bde1422c21a99524 .

Desperate mode question : was it replaced by smth else ? Any workaround ?

Serious mode question : Since eventually we'll have to bite the bullet and do an upgrade, how would you propose dealing with 1000s lines of java code using arrays of primitives ?


thank you

--------------pZ0PfT0sNoQj8yE4Tv4ULHOl-- From sitnikov.vladimir@gmail.com Fri Jul 3 22:27:48 2026 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 1qlAaz-001a3z-R1 for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Sep 2023 16:07:33 +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 1qlAax-00D8ft-Ha for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Sep 2023 16:07:31 +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 1qlAax-00D8fg-9X for pgsql-jdbc@lists.postgresql.org; Tue, 26 Sep 2023 16:07:31 +0000 Received: from mail-vk1-xa36.google.com ([2607:f8b0:4864:20::a36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlAas-007i9m-6X for pgsql-jdbc@postgresql.org; Tue, 26 Sep 2023 16:07:30 +0000 Received: by mail-vk1-xa36.google.com with SMTP id 71dfb90a1353d-496a775af2fso3238287e0c.0 for ; Tue, 26 Sep 2023 09:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695744443; x=1696349243; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4XW8EWkecCCH4TKBK2lKR9Mdb8H/t7hwUd7Hv8cGess=; b=LdFerYSrJVcnBVlzuJ+z1Dg0qGZjqKMz1d9cCehlDqVPdHf0sDVusGrm7ZlQzToy3A V2T51SCk5wZL+HUemwB0uM3oo90mN4tIcqHMoDSt0FRYApraSHUDO0LvJ5gi3dlSdIg3 TMNmuTUDCTnmE02N5bkaJLQldT4eBSRRUG/1FdA6+Z0yoX7aGsAnFsM0M/zZLsCylCmV jF1i8g2RCOFAiJJCBYmCtlcgXL5WXpXVDtclYXjym2tMQwAwvn2oB+cFyKeIRf555eFn YbqTawBgKvLL+A1ekz8YYtZOHVocb2oHICx+cxOzd9vtBeDP6IqyP/aLqTvdo7S1o8CC D5+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695744443; x=1696349243; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4XW8EWkecCCH4TKBK2lKR9Mdb8H/t7hwUd7Hv8cGess=; b=eutWuXM6f+uSj6Gc3tbD6htBoLJ2ZXz17OuMNTiESHwcymWlfc+EPK2pwHwZxg8kUy 72rqyFuT0e5ppLXF2Uo8cqcxjA5IwuP1+e03jj6SX4W8flT0zb8pG18pw/q23Gzbagil vLfGGFIabq6YiZA4ME3B0TQ9bDQkEo1oqboTHxJeNvEF4iItSIjUwHGIILe8PqJ18Ora jx6fJKMYivCYOLDestyAn9l5rihdDlyCQz6r9rh9/9aT/iGJ5qlUh1YkGP90YovuMjMk jGpxs6HXIILUpRW+MCT31q6Qmwe9VQSfekvrejmj01dDIq9+QWg/vQs+LAGxIJOc+KMR pASQ== X-Gm-Message-State: AOJu0YyDrd6BVBtyzdL8WBWC3ryiFSd3zyKx9d0XvcLPVDzEqcknhlpW 7mAgyTwWXmJHGB8Go0ae1/uWnXuapx1lZRJ0QXE= X-Google-Smtp-Source: AGHT+IHh9DwtUNAyauYRUUAC5cvOZ4UtjO6CUwJCSFjeFGHc9aqlWkpVILJ658k5Wi224KO5Q+Had6KRozLrHNhA4Vo= X-Received: by 2002:a1f:e6c3:0:b0:47e:8a9:478c with SMTP id d186-20020a1fe6c3000000b0047e08a9478cmr6448675vkh.16.1695744443483; Tue, 26 Sep 2023 09:07:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vladimir Sitnikov Date: Tue, 26 Sep 2023 19:07:12 +0300 Message-ID: Subject: Re: Regarding useObjects To: Achilleas Mantzios - cloud Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I see support for useObjects was dropped some time in 2020, with this commit : 529e5dc3a8f071ad4946daf3bde1422c21a99524 . Could you provide a test case that demonstrates the failure? It is hard to understand what you mean by "useObjects was dropped" Vladimir From a.mantzios@cloud.gatewaynet.com Fri Jul 3 22:27:48 2026 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 1qlBOq-001dUo-9Y for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Sep 2023 16:59:04 +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 1qlBOo-00DRfR-E9 for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Sep 2023 16:59:02 +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 1qlBOo-00DRf6-68 for pgsql-jdbc@lists.postgresql.org; Tue, 26 Sep 2023 16:59:02 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlBOj-007iY1-4V for pgsql-jdbc@postgresql.org; Tue, 26 Sep 2023 16:59:01 +0000 Content-Type: multipart/alternative; boundary="------------2ZeCzAgPjLovw7TcF0afFgL8" Message-ID: Date: Tue, 26 Sep 2023 19:58:49 +0300 MIME-Version: 1.0 Subject: Re: Regarding useObjects To: Vladimir Sitnikov Cc: pgsql-jdbc@postgresql.org References: Content-Language: en-US From: Achilleas Mantzios In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------2ZeCzAgPjLovw7TcF0afFgL8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Στις 26/9/23 19:07, ο/η Vladimir Sitnikov έγραψε: >> I see support for useObjects was dropped some time in 2020, with this commit : 529e5dc3a8f071ad4946daf3bde1422c21a99524 . > Could you provide a test case that demonstrates the failure? > It is hard to understand what you mean by "useObjects was dropped" There used to be a variable inside : src/main/java/org/postgresql/jdbc/PgArray.java which was like : private final boolean useObjects; this.useObjects = true; so there was the option to change this to false and recompile. This variable was removed between REL42.2.0 and REL42.3.0 . So not quite support, sorry for my wording. > > Vladimir -- Achilleas Mantzios IT DEV - HEAD IT DEPT Dynacom Tankers Mgmt --------------2ZeCzAgPjLovw7TcF0afFgL8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Στις 26/9/23 19:07, ο/η Vladimir Sitnikov έγραψε:
I see support for useObjects was dropped some time in 2020, with this commit : 529e5dc3a8f071ad4946daf3bde1422c21a99524 .
Could you provide a test case that demonstrates the failure?
It is hard to understand what you mean by "useObjects was dropped"

There used to be a variable inside : src/main/java/org/postgresql/jdbc/PgArray.java which was like :

private final boolean useObjects;
this.useObjects = true;

so there was the option to change this to false and recompile. This variable was removed between REL42.2.0 and REL42.3.0 . So not quite support, sorry for my wording.


Vladimir
-- 
Achilleas Mantzios
 IT DEV - HEAD
 IT DEPT
 Dynacom Tankers Mgmt
--------------2ZeCzAgPjLovw7TcF0afFgL8-- From sitnikov.vladimir@gmail.com Fri Jul 3 22:27:48 2026 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 1qlNdw-002WGQ-TX for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 06:03:28 +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 1qlNdv-000hdq-IA for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 06:03:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlNdv-000hdV-A1 for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 06:03:27 +0000 Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlNds-006sGn-1Y for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 06:03:26 +0000 Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-7abbe1067d1so2539349241.0 for ; Tue, 26 Sep 2023 23:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695794603; x=1696399403; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UR0E5xi5lv7kjQfSVSYw7C9a4mlf/oYnCuy5U8juLJA=; b=Iy/U9M3xqSw9MVGJaBSGxfY92PePGAfx2UMLBsn5u70A8m5UpG7pT9zcT95VvOJ9mK n7Rva6L7k7GE3qo5EnBbLUu4YuPE2kQ5w78SKflynUcvOd6ObGcwir/DQRs/sUcRcZuY efQ6PDnIDKKFi0hQj2YB4QXMfPZuLLtKiEVq74i6bJRz6wDfkvuVvb/ktVuNespdCSNd Yxiv/ksnXTlGf6v5uMtCYviNVq4tK3y6UEF4VlhyGyJiN6kWwZjExjYtiumaFc0i9c9b sOPYL27uq0W81HGM7i8yb6NiC+9QxYREig5ixeCKkdaTK5Ir34/faGywXfS4KDJ5E8nP thiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695794603; x=1696399403; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UR0E5xi5lv7kjQfSVSYw7C9a4mlf/oYnCuy5U8juLJA=; b=oZ7UPA0Z6naNHOrrX+6ApI61Xe+yaVAtizZ6u60albCD0FJ5xeTjkqEDcBffkTqppX 8K4hyBXvFISGPrj1ktXjr2Czkj4fk6SbbMO/SMjdJIexHbpVH6nuv8wbxuPsyYsJCUJ3 GCsLdS+idft1DA9SGhuUyVDkrZ5mUb6YYNUgjCVsXe6p3socb4EisOR+sf6MECH/25l3 iZYJ2q1EUuEp+BTMOwIEdYgfu2JPMa4TfRDj3hrxMX2BGWiw+Z9PdOaNok7eZvYNksjI DG+kQzfE1XHXwHCgwj+DGIYxYB7ux5o2wwGKvpSE1spFn6GglfJNhjMe3R5IXIsuZk1h RmDg== X-Gm-Message-State: AOJu0Yy6Le3eDpvSvh08hzSNMJLSocueuJlzFIuO7ErUwG1I/5xsr9BW csUT/JNKj/N17E1+aQNVFAXKSyBoqoPahsOvdES6BMXDFII= X-Google-Smtp-Source: AGHT+IG1S+ZVnLodtc01R/ePHE4yLdZ8HVfGcddVowP/yXFn3qq64Mopk1V4tkYwCZMWcPPhKO6SZAwrfm9gaYLXH8A= X-Received: by 2002:a05:6102:539:b0:452:8afa:e1ac with SMTP id m25-20020a056102053900b004528afae1acmr1076002vsa.26.1695794602926; Tue, 26 Sep 2023 23:03:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vladimir Sitnikov Date: Wed, 27 Sep 2023 09:03:11 +0300 Message-ID: Subject: Re: Regarding useObjects To: Achilleas Mantzios Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > so there was the option to change this to false and recompile We try doing our best to keep backward compatibility both compilation-wise and behaviour-wise. However, we treat "private fields and methods" as private, and we do not expect people would depend on them. If you have to modify sources or depend on private APIs I would suggest raising an issue or PR so it could be incorporated into the driver itself. Would you please provide a test case of what you are doing with PgArray? What is exactly the sequence of JDBC calls, the actual and the expected outcomes in your case? The mentioned "useObjects" has been removed in https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding arrays) Vladimir From a.mantzios@cloud.gatewaynet.com Fri Jul 3 22:27:48 2026 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 1qlQOs-002jAJ-GO for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 09:00:06 +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 1qlQOq-001w4W-3Y for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 09:00:04 +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 1qlQOp-001w45-RI for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 09:00:03 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlQOm-007rPp-9E for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 09:00:02 +0000 Message-ID: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> Date: Wed, 27 Sep 2023 11:59:57 +0300 MIME-Version: 1.0 Subject: Re: Regarding useObjects Content-Language: en-US To: Vladimir Sitnikov Cc: pgsql-jdbc@postgresql.org References: From: Achilleas Mantzios - cloud In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Good Day Vladimir On 9/27/23 09:03, Vladimir Sitnikov wrote: >> so there was the option to change this to false and recompile > We try doing our best to keep backward compatibility both > compilation-wise and behaviour-wise. > However, we treat "private fields and methods" as private, and we do > not expect people would depend on them. > If you have to modify sources or depend on private APIs I would > suggest raising an issue or PR so it could be incorporated > into the driver itself. > > Would you please provide a test case of what you are doing with PgArray? > What is exactly the sequence of JDBC calls, the actual and the > expected outcomes in your case? E.g. for the case of floats, we have to change all: java.sql.Array arr = rs.getArray(1); Object objarr = arr.getArray(); float flarr[] = (float[]) objarr; to java.sql.Array arr = rs.getArray(1); Object objarr = arr.getArray(); Float flarr[] = (Float[]) objarr; > > The mentioned "useObjects" has been removed in > https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding arrays) > > Vladimir From davecramer@postgres.rocks Fri Jul 3 22:27:48 2026 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 1qlR6S-002mVA-Uw for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 09:45:08 +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 1qlR6R-002ZDR-N1 for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 09:45:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlR6R-002ZDD-FG for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 09:45:07 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qlR6O-006u8e-Ui for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 09:45:06 +0000 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id BE6C92018B for ; Wed, 27 Sep 2023 05:45:03 -0400 (EDT) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-50335f6b48dso18171099e87.3 for ; Wed, 27 Sep 2023 02:45:03 -0700 (PDT) X-Gm-Message-State: AOJu0Yy4x9NYFuDJEUvi5DgWfWbQfbh08yXgsxGHAmia0XywfdNN4ouz iKVM+2fdBmUshDKJ6ESMurtC2n4t0DnVuoW5c4M= X-Google-Smtp-Source: AGHT+IGye5a5elIRKcajGMnRmn8BVLy3J+70KHZF32TFHG+ti6ix9aArxHVSPXp/vd2QsEIqWnVNdl4OtQtZFh/bhIE= X-Received: by 2002:a05:6512:1051:b0:503:1bd4:5e43 with SMTP id c17-20020a056512105100b005031bd45e43mr1577810lfb.40.1695807902355; Wed, 27 Sep 2023 02:45:02 -0700 (PDT) MIME-Version: 1.0 References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> In-Reply-To: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> From: Dave Cramer Date: Wed, 27 Sep 2023 05:44:45 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Regarding useObjects To: Achilleas Mantzios - cloud Cc: Vladimir Sitnikov , pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary="000000000000a096a60606540b21" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a096a60606540b21 Content-Type: text/plain; charset="UTF-8" On Wed, 27 Sept 2023 at 05:00, Achilleas Mantzios - cloud < a.mantzios@cloud.gatewaynet.com> wrote: > Good Day Vladimir > > On 9/27/23 09:03, Vladimir Sitnikov wrote: > >> so there was the option to change this to false and recompile > > We try doing our best to keep backward compatibility both > > compilation-wise and behaviour-wise. > > However, we treat "private fields and methods" as private, and we do > > not expect people would depend on them. > > If you have to modify sources or depend on private APIs I would > > suggest raising an issue or PR so it could be incorporated > > into the driver itself. > > > > Would you please provide a test case of what you are doing with PgArray? > > What is exactly the sequence of JDBC calls, the actual and the > > expected outcomes in your case? > > E.g. for the case of floats, we have to change all: > > java.sql.Array arr = rs.getArray(1); > > Object objarr = arr.getArray(); > > float flarr[] = (float[]) objarr; > > to > > java.sql.Array arr = rs.getArray(1); > > Object objarr = arr.getArray(); > > Float flarr[] = (Float[]) objarr; > So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls. Dave > > > > > The mentioned "useObjects" has been removed in > > https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding arrays) > > > > Vladimir > > > --000000000000a096a60606540b21 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, 27 Sept 2023 at 05:00, Achill= eas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:
Good Day Vladimir

On 9/27/23 09:03, Vladimir Sitnikov wrote:
>> so there was the option to change this to false and recompile
> We try doing our best to keep backward compatibility both
> compilation-wise and behaviour-wise.
> However, we treat "private fields and methods" as private, a= nd we do
> not expect people would depend on them.
> If you have to modify sources or depend on private APIs I would
> suggest raising an issue or PR so it could be incorporated
> into the driver itself.
>
> Would you please provide a test case of what you are doing with PgArra= y?
> What is exactly the sequence of JDBC calls, the actual and the
> expected outcomes in your case?

E.g. for the case of floats, we have to change all:

java.sql.Array arr =3D rs.getArray(1);

Object objarr =3D arr.getArray();

float flarr[] =3D (float[]) objarr;

to

java.sql.Array arr =3D rs.getArray(1);

Object objarr =3D arr.getArray();

Float flarr[] =3D (Float[]) objarr;

So the problem with using float instead of Float is that it is = impossible to have a null float and arrays can have nulls.

Dave=C2=A0

>
> The mentioned "useObjects" has been removed in
> https://github.com/pgjdbc/pgjdbc/pull/1194 (Refac= tor decoding arrays)
>
> Vladimir


--000000000000a096a60606540b21-- From sitnikov.vladimir@gmail.com Fri Jul 3 22:27:48 2026 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 1qlRGt-002n0y-E5 for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 09:55:55 +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 1qlRGs-002fL9-2T for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 09:55:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlRGr-002fKs-PY for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 09:55:53 +0000 Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlRGk-006uEB-W0 for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 09:55:52 +0000 Received: by mail-vk1-xa2d.google.com with SMTP id 71dfb90a1353d-48feedb90d2so3725335e0c.1 for ; Wed, 27 Sep 2023 02:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695808546; x=1696413346; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=enATh++zg82xBcdcNNaBIgUJAdAe9r9AidCmT9fiU0U=; b=iZGbq2F9cCSr4OFaMKl15CWn3BPGiW76D+ilm0BPJdqVi0gVqxsPyX9at97kr99Sru xGfsrbho8TuSzwQf2nZD2eNdePE4SSmMg5LsR1O646Gl0EeqZG7nWMFZYZLf82YwGv1D GlpiHCwfzwJ9atFRpzm00uRCptl+udUZ2qHyCZaVtvR1GD5Cd2cWi4gfhpbbTj3Xbsyi d891h6Z5dnNajDdDyfi8jk2SPedYV0HrUiJIIwCqNtKEp+gmM08rKQTA5T5GhIwW802h /v8EIM13xXpcF5bShdgsjqyUIxVYrHW4QK3kx2wfEs2DfjCCO5RCen9djeyL+ZD/BreF VWPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695808546; x=1696413346; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=enATh++zg82xBcdcNNaBIgUJAdAe9r9AidCmT9fiU0U=; b=fqnBu8oHCEjiIUw2l3Yd2Gq9AE9ShOhPw5axXr4+dVG09YGWEQEkz/HRE2hELvEsL3 c+H5y/8LKxhebl71SjTKHh/arl7V783jLemKSpRBTZ6LmBa+EjEWF1wOhGstqxwIMDEk 2yN427Ivcj/0RzHDOXzB3+PHKBlUW60zA9XagYllLH9hhceFMXFEBiYZua6KBMb3fek2 IXTd1OWe8eJtrHUlq+rOWJnd0WtGx8qdpk3nBq5RO9sN76NTzl8PLJmZySjg/Jzv6gMQ OV2FZlySy9XMZgqrOhHqsW+akH7fznVIlyZLedMdrEJaKRIRxhc6k+Tz2DPHPpUjLjRm CPaA== X-Gm-Message-State: AOJu0YyK0v/iA05vt8aJp/Pg4jmXVGVno7mIciFnbtiomq+vgVUIcY0H AkCVa+wixfGYy5udCa/RPgM7UOmH3BSheavjnu6KsJ48KtY= X-Google-Smtp-Source: AGHT+IGLuEZvvRadu/djK9/P0C+YMduB9DF1zKlc01ES8bHvRLK/5MQaxC9jO4GNf0686X16Wnm9oSTPFFLtz0rknFA= X-Received: by 2002:a1f:6283:0:b0:49a:1605:ee6a with SMTP id w125-20020a1f6283000000b0049a1605ee6amr1510151vkb.5.1695808546040; Wed, 27 Sep 2023 02:55:46 -0700 (PDT) MIME-Version: 1.0 References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> In-Reply-To: From: Vladimir Sitnikov Date: Wed, 27 Sep 2023 12:55:35 +0300 Message-ID: Subject: Re: Regarding useObjects To: Dave Cramer , Achilleas Mantzios - cloud Cc: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary="000000000000fe6fd70606543151" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fe6fd70606543151 Content-Type: text/plain; charset="UTF-8" > So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls. There's a feature request for retrieving primitive arrays: https://github.com/pgjdbc/pgjdbc/issues/2939 Vladimir --000000000000fe6fd70606543151 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> So the problem with using float instead of Float= is that it is impossible to have a null float and arrays can have nulls.

There's a feature request for retrieving primiti= ve arrays: https:/= /github.com/pgjdbc/pgjdbc/issues/2939

Vladimir

--000000000000fe6fd70606543151-- From a.mantzios@cloud.gatewaynet.com Fri Jul 3 22:27:48 2026 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 1qlRL7-002nFh-8G for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:00:17 +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 1qlRL5-002hX5-TW for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:00:15 +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 1qlRL5-002hWi-LW for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 10:00:15 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlRL2-007rwq-A9 for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 10:00:15 +0000 Content-Type: multipart/alternative; boundary="------------Mljf64FxlMAFjH86MLsve15N" Message-ID: <405c32b4-4b39-b961-010c-93386e7f7ac4@cloud.gatewaynet.com> Date: Wed, 27 Sep 2023 13:00:09 +0300 MIME-Version: 1.0 Subject: Re: Regarding useObjects Content-Language: en-US To: Dave Cramer Cc: Vladimir Sitnikov , pgsql-jdbc@postgresql.org References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------Mljf64FxlMAFjH86MLsve15N Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/27/23 12:44, Dave Cramer wrote: > > > On Wed, 27 Sept 2023 at 05:00, Achilleas Mantzios - cloud > wrote: > > Good Day Vladimir > > On 9/27/23 09:03, Vladimir Sitnikov wrote: > >> so there was the option to change this to false and recompile > > We try doing our best to keep backward compatibility both > > compilation-wise and behaviour-wise. > > However, we treat "private fields and methods" as private, and we do > > not expect people would depend on them. > > If you have to modify sources or depend on private APIs I would > > suggest raising an issue or PR so it could be incorporated > > into the driver itself. > > > > Would you please provide a test case of what you are doing with > PgArray? > > What is exactly the sequence of JDBC calls, the actual and the > > expected outcomes in your case? > > E.g. for the case of floats, we have to change all: > > java.sql.Array arr = rs.getArray(1); > > Object objarr = arr.getArray(); > > float flarr[] = (float[]) objarr; > > to > > java.sql.Array arr = rs.getArray(1); > > Object objarr = arr.getArray(); > > Float flarr[] = (Float[]) objarr; > > > > So the problem with using float instead of Float is that it is > impossible to have a null float and arrays can have nulls. Thanks Dave, we wrote much of the code before 2008, and we had to implement our own version of nulls in arrays of primitives. So this code was stuck everywhere. Plus we got like 120+ remote sites (slaves) ( which run ... even older code) so we must fully support them as well. Its only about 200 source files in the central system's repo, so we will have to do it sooner or later. The hard part would be migrating from pgsql 10 to 16. > > Dave > > > > > > The mentioned "useObjects" has been removed in > > https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding > arrays) > > > > Vladimir > > --------------Mljf64FxlMAFjH86MLsve15N Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 9/27/23 12:44, Dave Cramer wrote:


On Wed, 27 Sept 2023 at 05:00, Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:
Good Day Vladimir

On 9/27/23 09:03, Vladimir Sitnikov wrote:
>> so there was the option to change this to false and recompile
> We try doing our best to keep backward compatibility both
> compilation-wise and behaviour-wise.
> However, we treat "private fields and methods" as private, and we do
> not expect people would depend on them.
> If you have to modify sources or depend on private APIs I would
> suggest raising an issue or PR so it could be incorporated
> into the driver itself.
>
> Would you please provide a test case of what you are doing with PgArray?
> What is exactly the sequence of JDBC calls, the actual and the
> expected outcomes in your case?

E.g. for the case of floats, we have to change all:

java.sql.Array arr = rs.getArray(1);

Object objarr = arr.getArray();

float flarr[] = (float[]) objarr;

to

java.sql.Array arr = rs.getArray(1);

Object objarr = arr.getArray();

Float flarr[] = (Float[]) objarr;


So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

Thanks Dave, we wrote much of the code before 2008, and we had to implement our own version of nulls in arrays of primitives. So this code was stuck everywhere. Plus we got like 120+ remote sites (slaves) ( which run ... even older code) so we must fully support them as well. Its only about 200 source files in the central system's repo, so we will have to do it sooner or later.

The hard part would be migrating from pgsql 10 to 16.


Dave 

>
> The mentioned "useObjects" has been removed in
> https://github.com/pgjdbc/pgjdbc/pull/1194 (Refactor decoding arrays)
>
> Vladimir


--------------Mljf64FxlMAFjH86MLsve15N-- From a.mantzios@cloud.gatewaynet.com Fri Jul 3 22:27:48 2026 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 1qlRSM-002nn2-Iw for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:07:46 +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 1qlRSL-002mKt-8X for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:07:45 +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 1qlRSL-002mKX-0V for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 10:07:45 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlRSH-007s0I-UT for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 10:07:44 +0000 Content-Type: multipart/alternative; boundary="------------M2SWLnkNLwOf3TMVSt4Rzdk4" Message-ID: Date: Wed, 27 Sep 2023 13:07:39 +0300 MIME-Version: 1.0 Subject: Re: Regarding useObjects Content-Language: en-US To: Vladimir Sitnikov , Dave Cramer Cc: pgsql-jdbc@postgresql.org References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------M2SWLnkNLwOf3TMVSt4Rzdk4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/27/23 12:55, Vladimir Sitnikov wrote: > > So the problem with using float instead of Float is that it is > impossible to have a null float and arrays can have nulls. > > There's a feature request for retrieving primitive arrays: > https://github.com/pgjdbc/pgjdbc/issues/2939 back in pre-postgresql-42* dayswe used to use -888 and -888.888 to represent int NULL and float NULL respectively, quite ...primitive but it worked. We should retain this old mapping , but once all systems are up to date we will start storing and reading NULLs in arrays as NULLs. > > Vladimir > --------------M2SWLnkNLwOf3TMVSt4Rzdk4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


On 9/27/23 12:55, Vladimir Sitnikov wrote:
> So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

There's a feature request for retrieving primitive arrays: https://github.com/pgjdbc/pgjdbc/issues/2939

back in pre-postgresql-42* days we used to use -888 and -888.888 to represent int NULL and float NULL respectively, quite ...primitive but it worked. We should retain this old mapping , but once all systems are up to date we will start storing and reading NULLs in arrays as NULLs.


Vladimir

--------------M2SWLnkNLwOf3TMVSt4Rzdk4-- From davecramer@postgres.rocks Fri Jul 3 22:27:48 2026 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 1qlRcI-002oTs-7B for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:18:02 +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 1qlRcG-002r3G-5v for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:18:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlRcF-002r2t-UG for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 10:17:59 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qlRcD-006uPN-DO for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 10:17:58 +0000 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id 384DC201A1 for ; Wed, 27 Sep 2023 06:17:56 -0400 (EDT) Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2c12ae20a5cso174387721fa.2 for ; Wed, 27 Sep 2023 03:17:56 -0700 (PDT) X-Gm-Message-State: AOJu0YxD3u2iDW6dIV5ixBwQTXkiC9jw8RRb8VYlqnlH9THcvcZS5T5A 5DnTrJWMMunQsBM4LFVdGaJgA8fvpP+xLwkqPYw= X-Google-Smtp-Source: AGHT+IHJTnIDdnKxP5UZKQ9JGxLYvgXHDjeJyIbjJUI11Zt4PbC5/jQIGpbuVvoab2uh6tukyUjOL/FO96d60QpNKi4= X-Received: by 2002:a2e:9c53:0:b0:2bf:7894:a490 with SMTP id t19-20020a2e9c53000000b002bf7894a490mr1586219ljj.38.1695809874548; Wed, 27 Sep 2023 03:17:54 -0700 (PDT) MIME-Version: 1.0 References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> In-Reply-To: From: Dave Cramer Date: Wed, 27 Sep 2023 06:17:37 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Regarding useObjects To: Achilleas Mantzios - cloud Cc: Vladimir Sitnikov , pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary="0000000000002ddd9006065481f6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002ddd9006065481f6 Content-Type: text/plain; charset="UTF-8" On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud < a.mantzios@cloud.gatewaynet.com> wrote: > > On 9/27/23 12:55, Vladimir Sitnikov wrote: > > > So the problem with using float instead of Float is that it is > impossible to have a null float and arrays can have nulls. > > There's a feature request for retrieving primitive arrays: > https://github.com/pgjdbc/pgjdbc/issues/2939 > > back in pre-postgresql-42* days we used to use -888 and -888.888 to > represent int NULL and float NULL respectively, quite ...primitive but it > worked. We should retain this old mapping , but once all systems are up to > date we will start storing and reading NULLs in arrays as NULLs. > Using that mapping is not something that we would entertain. If you are going to actually store NULL in the array, how would that work with primitives ? Dave > > Vladimir > > --0000000000002ddd9006065481f6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, 27 Sept 2023 at 06:07, Achill= eas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:
=20 =20 =20


On 9/27/23 12:55, Vladimir Sitnikov wrote:
=20
> So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

There's a feature request for retrieving primitive arrays: http= s://github.com/pgjdbc/pgjdbc/issues/2939

back in pre-postgresql-42* days we used to use -888 and -888.888 to represent int NULL and float NULL respectively, quite ...primitive but it worked. We should retain this old mapping , but once all systems are up to date we will start storing and reading NULLs in arrays as NULLs.

Using that mapping is not something that we would entertain.= =C2=A0

If you are going to actually store NULL in = the array, how would that work with primitives ?

D= ave


Vladimir

--0000000000002ddd9006065481f6-- From a.mantzios@cloud.gatewaynet.com Fri Jul 3 22:27:48 2026 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 1qlRmp-002p7S-Qt for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:28:55 +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 1qlRmo-002uXI-CC for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:28:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlRmn-002uX3-W9 for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 10:28:54 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlRmg-006uTM-GT for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 10:28:52 +0000 Content-Type: multipart/alternative; boundary="------------a5JhFKxg3OxnKAczeD2kpboC" Message-ID: <702e914b-6a09-6176-83b3-471a13076d5e@cloud.gatewaynet.com> Date: Wed, 27 Sep 2023 13:28:42 +0300 MIME-Version: 1.0 Subject: Re: Regarding useObjects Content-Language: en-US To: Dave Cramer Cc: Vladimir Sitnikov , pgsql-jdbc@postgresql.org References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------a5JhFKxg3OxnKAczeD2kpboC Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/27/23 13:17, Dave Cramer wrote: > > > On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud > wrote: > > > On 9/27/23 12:55, Vladimir Sitnikov wrote: >> > So the problem with using float instead of Float is that it is >> impossible to have a null float and arrays can have nulls. >> >> There's a feature request for retrieving primitive arrays: >> https://github.com/pgjdbc/pgjdbc/issues/2939 > > back in pre-postgresql-42* dayswe used to use -888 and -888.888 to > represent int NULL and float NULL respectively, quite ...primitive > but it worked. We should retain this old mapping , but once all > systems are up to date we will start storing and reading NULLs in > arrays as NULLs. > > Using that mapping is not something that we would entertain. > > If you are going to actually store NULL in the array, how would that > work with primitives ? We support our central system (master) plus 120 slave systems communicating via satellites (running very old versions of everything , linux, postgersql , java, jdbc, etc) using custom replication code (a hack of DBmirror) that we wrote back in 2003 or so. Data come back and forth, so we have to support all those 120 archaic slaves while we upgrade and after we upgrade the central system. When everything is up to date, (which will be some years from now), then we will start actually storing NULLs inside arrays instead of -888 and -888.888 . BUT even then, we are not willing to update the actual old data (-888) to the new NULL version, because that would trigger a massive replication traffic from our central system to the slaves. Also updating all past / historic values would cause bloating, huge autovacuum activity, among other things on those remote slaves that run unmanned (in simple english : I am the only DBA for all 1 + 120 postgresql instances) . So we should support historic data as they are, until something bigger happens (like a vast update in our topology/logic/etc). > > Dave > >> >> Vladimir >> --------------a5JhFKxg3OxnKAczeD2kpboC Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 9/27/23 13:17, Dave Cramer wrote:


On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:


On 9/27/23 12:55, Vladimir Sitnikov wrote:
> So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

There's a feature request for retrieving primitive arrays: https://github.com/pgjdbc/pgjdbc/issues/2939

back in pre-postgresql-42* days we used to use -888 and -888.888 to represent int NULL and float NULL respectively, quite ...primitive but it worked. We should retain this old mapping , but once all systems are up to date we will start storing and reading NULLs in arrays as NULLs.

Using that mapping is not something that we would entertain. 

If you are going to actually store NULL in the array, how would that work with primitives ?

We support our central system (master) plus 120 slave systems communicating via satellites (running very old versions of everything , linux, postgersql , java, jdbc, etc) using custom replication code (a hack of DBmirror) that we wrote back in 2003 or so. Data come back and forth, so we have to support all those 120 archaic slaves while we upgrade and after we upgrade the central system.

When everything is up to date, (which will be some years from now), then we will start actually storing NULLs inside arrays instead of -888 and -888.888 . BUT even then, we are not willing to update the actual old data (-888) to the new NULL version, because that would trigger a massive replication traffic from our central system to the slaves. Also updating all past / historic values would cause bloating, huge autovacuum activity, among other things on those remote slaves that run unmanned (in simple english : I am the only DBA for all 1 + 120 postgresql instances) . So we should support historic data as they are, until something bigger happens (like a vast update in our topology/logic/etc).


Dave


Vladimir

--------------a5JhFKxg3OxnKAczeD2kpboC-- From davecramer@postgres.rocks Fri Jul 3 22:27:48 2026 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 1qlRyS-002puv-CD for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:40:56 +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 1qlRxS-0031aB-KA for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 10:39:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlRxS-0031Zr-7e for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 10:39:54 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qlRxL-006uXi-3q for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 10:39:53 +0000 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id 24E292018B for ; Wed, 27 Sep 2023 06:39:45 -0400 (EDT) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-530bc7c5bc3so13179859a12.1 for ; Wed, 27 Sep 2023 03:39:45 -0700 (PDT) X-Gm-Message-State: AOJu0YzVFoa4epu8U/8vOmOS+LHUoXGDOFckR+6Qz6k8lY31UoznH9nF YZzV2OJzcEcw8qfwmB4KEVz6SY/hZgSChTodmu0= X-Google-Smtp-Source: AGHT+IHuPlSUqdGHpY37XEyCqPawP98NvCjMvWsLtBFUjP+45huGG25V7jVl8daUTBlRG6yuTi2uhyb4NTCS25QBnxs= X-Received: by 2002:aa7:ce11:0:b0:51e:1643:5ad0 with SMTP id d17-20020aa7ce11000000b0051e16435ad0mr1577918edv.8.1695811184927; Wed, 27 Sep 2023 03:39:44 -0700 (PDT) MIME-Version: 1.0 References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> <702e914b-6a09-6176-83b3-471a13076d5e@cloud.gatewaynet.com> In-Reply-To: <702e914b-6a09-6176-83b3-471a13076d5e@cloud.gatewaynet.com> From: Dave Cramer Date: Wed, 27 Sep 2023 06:39:27 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Regarding useObjects To: Achilleas Mantzios - cloud Cc: Vladimir Sitnikov , pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary="00000000000048ac97060654cf53" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000048ac97060654cf53 Content-Type: text/plain; charset="UTF-8" On Wed, 27 Sept 2023 at 06:28, Achilleas Mantzios - cloud < a.mantzios@cloud.gatewaynet.com> wrote: > > On 9/27/23 13:17, Dave Cramer wrote: > > > > On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud < > a.mantzios@cloud.gatewaynet.com> wrote: > >> >> On 9/27/23 12:55, Vladimir Sitnikov wrote: >> >> > So the problem with using float instead of Float is that it is >> impossible to have a null float and arrays can have nulls. >> >> There's a feature request for retrieving primitive arrays: >> https://github.com/pgjdbc/pgjdbc/issues/2939 >> >> back in pre-postgresql-42* days we used to use -888 and -888.888 to >> represent int NULL and float NULL respectively, quite ...primitive but it >> worked. We should retain this old mapping , but once all systems are up to >> date we will start storing and reading NULLs in arrays as NULLs. >> > Using that mapping is not something that we would entertain. > > If you are going to actually store NULL in the array, how would that work > with primitives ? > > We support our central system (master) plus 120 slave systems > communicating via satellites (running very old versions of everything , > linux, postgersql , java, jdbc, etc) using custom replication code (a hack > of DBmirror) that we wrote back in 2003 or so. Data come back and forth, so > we have to support all those 120 archaic slaves while we upgrade and after > we upgrade the central system. > > When everything is up to date, (which will be some years from now), then > we will start actually storing NULLs inside arrays instead of -888 and > -888.888 . BUT even then, we are not willing to update the actual old data > (-888) to the new NULL version, because that would trigger a massive > replication traffic from our central system to the slaves. Also updating > all past / historic values would cause bloating, huge autovacuum activity, > among other things on those remote slaves that run unmanned (in simple > english : I am the only DBA for all 1 + 120 postgresql instances) . So we > should support historic data as they are, until something bigger happens > (like a vast update in our topology/logic/etc). > So it sounds like this would work for you if someone implemented primitive arrays. Dave --00000000000048ac97060654cf53 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, 27 Sept 2023 at 06:28, Achill= eas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:
=20 =20 =20


On 9/27/23 13:17, Dave Cramer wrote:
=20


On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com= > wrote:


On 9/27/23 12:55, Vladimir Sitnikov wrote:
> So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

There's a feature request for retrieving primitive arrays: https://github.com/pgjdbc/pgjdbc/issues/2939<= br>

back in pre-postgresql-42* days<= /span> we used to use -888 and -888.888 to represent int NULL and float NULL respectively, quite ...primitive but it worked. We should retain this old mapping , but once all systems are up to date we will start storing and reading NULLs in arrays as NULLs.

Using that mapping is not something that we would entertain.=C2=A0

If you are going to actually store NULL in the array, how would that work with primitives ?

We support our central system (master) plus 120 slave systems communicating via satellites (running very old versions of everything , linux, postgersql , java, jdbc, etc) using custom replication code (a hack of DBmirror) that we wrote back in 2003 or so. Data come back and forth, so we have to support all those 120 archaic slaves while we upgrade and after we upgrade the central system.

When everything is up to date, (which will be some years from now), then we will start actually storing NULLs inside arrays instead of -888 and -888.888 . BUT even then, we are not willing to update the actual old data (-888) to the new NULL version, because that would trigger a massive replication traffic from our central system to the slaves. Also updating all past / historic values would cause bloating, huge autovacuum activity, among other things on those remote slaves that run unmanned (in simple english : I am the only DBA for all 1 + 120 postgresql instances) . So we should support historic data as they are, until something bigger happens (like a vast update in our topology/logic/etc).

=

So it sounds like this would work for you = if someone implemented primitive arrays.=C2=A0=C2=A0

Dave
--00000000000048ac97060654cf53-- From a.mantzios@cloud.gatewaynet.com Fri Jul 3 22:27:48 2026 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 1qlSSR-002s7C-NE for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 11:11:55 +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 1qlSSP-003Gfv-VS for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Sep 2023 11:11:53 +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 1qlSSP-003Gff-Ll for pgsql-jdbc@lists.postgresql.org; Wed, 27 Sep 2023 11:11:53 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlSSI-007sdW-2B for pgsql-jdbc@postgresql.org; Wed, 27 Sep 2023 11:11:53 +0000 Content-Type: multipart/alternative; boundary="------------0tekGQRA05qmI3600gJj7zZV" Message-ID: <9ee20855-b728-f618-c97a-6c375cde76e0@cloud.gatewaynet.com> Date: Wed, 27 Sep 2023 14:11:42 +0300 MIME-Version: 1.0 Subject: Re: Regarding useObjects Content-Language: en-US To: Dave Cramer Cc: Vladimir Sitnikov , pgsql-jdbc@postgresql.org References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> <702e914b-6a09-6176-83b3-471a13076d5e@cloud.gatewaynet.com> From: Achilleas Mantzios - cloud In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------0tekGQRA05qmI3600gJj7zZV Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/27/23 13:39, Dave Cramer wrote: > > > On Wed, 27 Sept 2023 at 06:28, Achilleas Mantzios - cloud > wrote: > > > On 9/27/23 13:17, Dave Cramer wrote: >> >> >> On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud >> wrote: >> >> >> On 9/27/23 12:55, Vladimir Sitnikov wrote: >>> > So the problem with using float instead of Float is that >>> it is impossible to have a null float and arrays can have nulls. >>> >>> There's a feature request for retrieving primitive arrays: >>> https://github.com/pgjdbc/pgjdbc/issues/2939 >> >> back in pre-postgresql-42* dayswe used to use -888 and >> -888.888 to represent int NULL and float NULL respectively, >> quite ...primitive but it worked. We should retain this old >> mapping , but once all systems are up to date we will start >> storing and reading NULLs in arrays as NULLs. >> >> Using that mapping is not something that we would entertain. >> >> If you are going to actually store NULL in the array, how would >> that work with primitives ? > > We support our central system (master) plus 120 slave systems > communicating via satellites (running very old versions of > everything , linux, postgersql , java, jdbc, etc) using custom > replication code (a hack of DBmirror) that we wrote back in 2003 > or so. Data come back and forth, so we have to support all those > 120 archaic slaves while we upgrade and after we upgrade the > central system. > > When everything is up to date, (which will be some years from > now), then we will start actually storing NULLs inside arrays > instead of -888 and -888.888 . BUT even then, we are not willing > to update the actual old data (-888) to the new NULL version, > because that would trigger a massive replication traffic from our > central system to the slaves. Also updating all past / historic > values would cause bloating, huge autovacuum activity, among other > things on those remote slaves that run unmanned (in simple english > : I am the only DBA for all 1 + 120 postgresql instances) . So we > should support historic data as they are, until something bigger > happens (like a vast update in our topology/logic/etc). > > > So it sounds like this would work for you if someone implemented > primitive arrays. Yes or we could just upgrade JDBC driver in the central system, and touch those ~ 200 source files to just work (not throw exception), but still retaining the -888 representation. But an implementation of primitive arrays for ints,longs,floats,doubles would be better at this stage. > > Dave --------------0tekGQRA05qmI3600gJj7zZV Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 9/27/23 13:39, Dave Cramer wrote:


On Wed, 27 Sept 2023 at 06:28, Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:


On 9/27/23 13:17, Dave Cramer wrote:


On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:


On 9/27/23 12:55, Vladimir Sitnikov wrote:
> So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

There's a feature request for retrieving primitive arrays: https://github.com/pgjdbc/pgjdbc/issues/2939

back in pre-postgresql-42* days we used to use -888 and -888.888 to represent int NULL and float NULL respectively, quite ...primitive but it worked. We should retain this old mapping , but once all systems are up to date we will start storing and reading NULLs in arrays as NULLs.

Using that mapping is not something that we would entertain. 

If you are going to actually store NULL in the array, how would that work with primitives ?

We support our central system (master) plus 120 slave systems communicating via satellites (running very old versions of everything , linux, postgersql , java, jdbc, etc) using custom replication code (a hack of DBmirror) that we wrote back in 2003 or so. Data come back and forth, so we have to support all those 120 archaic slaves while we upgrade and after we upgrade the central system.

When everything is up to date, (which will be some years from now), then we will start actually storing NULLs inside arrays instead of -888 and -888.888 . BUT even then, we are not willing to update the actual old data (-888) to the new NULL version, because that would trigger a massive replication traffic from our central system to the slaves. Also updating all past / historic values would cause bloating, huge autovacuum activity, among other things on those remote slaves that run unmanned (in simple english : I am the only DBA for all 1 + 120 postgresql instances) . So we should support historic data as they are, until something bigger happens (like a vast update in our topology/logic/etc).


So it sounds like this would work for you if someone implemented primitive arrays. 

Yes or we could just upgrade JDBC driver in the central system, and touch those ~ 200 source files to just work (not throw exception), but still retaining the -888 representation. 

But an implementation of primitive arrays for ints,longs,floats,doubles would be better at this stage.



Dave
--------------0tekGQRA05qmI3600gJj7zZV-- From d.kho@upcmail.nl Fri Jul 3 14:41:15 2026 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 1qpo1e-0074Hf-VU for pgsql-jdbc@arkaria.postgresql.org; Mon, 09 Oct 2023 11:02:15 +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 1qpo1c-00D73P-SI for pgsql-jdbc@arkaria.postgresql.org; Mon, 09 Oct 2023 11:02:13 +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 1qo5wI-001z07-9j for pgsql-jdbc@lists.postgresql.org; Wed, 04 Oct 2023 17:45:39 +0000 Received: from csmtpq3-prd-nl1-vfz.edge.unified.services ([84.116.50.18]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qo5wE-0002DN-CK for pgsql-jdbc@postgresql.org; Wed, 04 Oct 2023 17:45:38 +0000 Received: from oxsmtp1-prd-nl1-vfz.nl1.unified.services ([100.107.81.18]) by csmtpq3-prd-nl1-vfz.edge.unified.services with esmtp (Exim 4.93) (envelope-from ) id 1qo5wC-00E5oW-J4 for pgsql-jdbc@postgresql.org; Wed, 04 Oct 2023 19:45:32 +0200 Received: from oxbe6-prd-nl1-vfz.nl1.unified.services ([100.107.81.71]) by oxsmtp1-prd-nl1-vfz.nl1.unified.services with ESMTP id o5wCqbq11uqUwo5wCqK5B6; Wed, 04 Oct 2023 19:45:32 +0200 X-Env-Mailfrom: d.kho@upcmail.nl X-Env-Rcptto: pgsql-jdbc@postgresql.org X-SourceIP: 100.107.81.71 X-CNFS-Analysis: v=2.4 cv=XLz2CytE c=1 sm=1 tr=0 ts=651da4bc cx=a_exe a=SvnJ2oNkyYtb1AparjDJCQ==:117 a=OK2lZ1ekeIwA:10 a=IkcTkHD0fZMA:10 a=Rh5JslpUAAAA:8 a=NEAV23lmAAAA:8 a=-RZh_682U-cDpAnj7nAA:9 a=g9bFxbsntpeSpdkS:21 a=_W_S_7VecoQA:10 a=lqcHg5cX4UMA:10 a=QEXdDO2ut3YA:10 a=JnFCiPYVSNOx6aJFZvsF:22 a=CRjGpuKUiiIuQkCM3vJl:22 X-Authenticated-Sender: d.kho@upcmail.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=upcmail.nl; s=202002corplgsmtpnl; t=1696441532; bh=EADs8gOksiZD8OPnlnfeCBOOqu1KQSSqFbJwtOukung=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=D/G2XR9yK/sOd6Be9XD8Zgp2DpMZhBxCcjtNGeghX14HzANflrxfriNu1SBCOKTRY tHfnPfhQWQaiA7NHIxoKkV2Z9GEkwTrQNF0shoo2Iug/J1njfP2RhfpXsEpLeybYER ElG93a/VTtH+w7e8VdiTqeudpAVydJ86iqqV6jC3pAt1eDAyUBi0AlDg10+q9tg4di HA5DbY8hCJQm9f1o5eU43oCfdcOF8N1Wd8SeHmbCpBLgQatdVrJCQ3I5H1LfzYra4L wMOPkIvFoZKsz48ejskxFu3+h0X/f8/996DLQ+X41XjZeIUP5dPhsjVWazFDw4eyME JWRlFfTcYlmSg== Date: Wed, 4 Oct 2023 19:45:32 +0200 (CEST) From: DB Kho To: "d.kho@upcmail.nl" Cc: pgsql-jdbc@postgresql.org Message-ID: <210597116.420616.1696441532527@mail.ziggo.nl> In-Reply-To: References: <8d8ea6c9-85a6-d1b8-309d-b1f5bc590840@cloud.gatewaynet.com> Subject: Re: Regarding useObjects MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer X-Originating-IP: 178.85.246.5 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfPJryGoviIxwmxoNQIPqOtPcyx/K6gdpY7kuZP1Pr29cLn2tDGdUZF1XN+7tx4rryf/LtP5q/hCyiNpRLDajRsPWLua6+sIbMJoCZfrbkbxddy8gPnox bycoxmT/spXVXyI6W2GtyIQIdYqrjGNq8TSXRYTVsZL+vjXMi9AFVqyns++YR72ZGtJbH2ZnzhZ2TP57xs9YuZ8JG59b1ooPas9Vm2DfSD9MnuzGK5FrIwcl qpdZSv/7uMRK3TnymbPqxA== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk
Unsubscribe

Op 27-09-2023 12:17 schreef Dave Cramer <davecramer@postgres.rocks>:




On Wed, 27 Sept 2023 at 06:07, Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com> wrote:


On 9/27/23 12:55, Vladimir Sitnikov wrote:
> So the problem with using float instead of Float is that it is impossible to have a null float and arrays can have nulls.

There's a feature request for retrieving primitive arrays: https://github.com/pgjdbc/pgjdbc/issues/2939

back in pre-postgresql-42* days we used to use -888 and -888.888 to represent int NULL and float NULL respectively, quite ...primitive but it worked. We should retain this old mapping , but once all systems are up to date we will start storing and reading NULLs in arrays as NULLs.

Using that mapping is not something that we would entertain. 

If you are going to actually store NULL in the array, how would that work with primitives ?

Dave



Vladimir