Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeIpJ-0002C9-IE for pgsql-general@arkaria.postgresql.org; Fri, 30 Sep 2022 16:25:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oeIpH-00021o-Vo for pgsql-general@arkaria.postgresql.org; Fri, 30 Sep 2022 16:25:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeIpH-0001xY-Kb for pgsql-general@lists.postgresql.org; Fri, 30 Sep 2022 16:25:23 +0000 Received: from ms-10.1blu.de ([178.254.4.101]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeIpF-0006al-1c for pgsql-general@lists.postgresql.org; Fri, 30 Sep 2022 16:25:22 +0000 Received: from [188.174.57.191] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeIpC-00058D-GM; Fri, 30 Sep 2022 18:25:18 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.16.1/8.14.9) with ESMTPS id 28UGPGl8036955 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 30 Sep 2022 18:25:16 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.16.1/8.14.9/Submit) id 28UGPG0V036954; Fri, 30 Sep 2022 18:25:16 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Fri, 30 Sep 2022 18:25:16 +0200 From: Matthias Apitz To: pgsql-general@lists.postgresql.org Subject: Re: NULL values and Java JDBC Message-ID: Reply-To: Matthias Apitz References: <53360920-f931-9854-9697-7088b139a3ef@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <53360920-f931-9854-9697-7088b139a3ef@gmail.com> X-Operating-System: FreeBSD 13.0-CURRENT r368166 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.57.191 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk El día viernes, septiembre 30, 2022 a las 09:56:07a. m. -0600, Rob Sargent escribió: > On 9/30/22 09:46, Matthias Apitz wrote: > > Hello, > > > > Columns may contain NULL values. The ecpg for pre-compiling ESQL/C code > > has an option to let return NULL values in CHAR columns as empty strings "" > > and INTEGER as INT_MIN (-0x7fffffff - 1) values. Is there a similar > > option for Java JDBC? > > > Have you looked at java.sql.PreparedStatement.setNull() or .setObject() etc? I was thinking more in a general setting of such feature (like ecpg does it for ESQL/C) and not addressing such problem on any single statement or object. matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub