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--