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 1m1Zxu-00068K-2z for pgsql-jdbc@arkaria.postgresql.org; Thu, 08 Jul 2021 19:45:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1Zxt-00089o-0j for pgsql-jdbc@arkaria.postgresql.org; Thu, 08 Jul 2021 19:45:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Zxs-00089e-RF for pgsql-jdbc@lists.postgresql.org; Thu, 08 Jul 2021 19:45:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Zxp-0001Po-GJ for pgsql-jdbc@lists.postgresql.org; Thu, 08 Jul 2021 19:45:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 168JjYDK2039696; Thu, 8 Jul 2021 15:45:34 -0400 From: Tom Lane To: Ivan Petrov cc: pgsql-jdbc@lists.postgresql.org Subject: Re: Bad value for type BigDecimal : Infinity In-reply-to: References: Comments: In-reply-to Ivan Petrov message dated "Thu, 08 Jul 2021 19:37:44 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2039694.1625773534.1@sss.pgh.pa.us> Date: Thu, 08 Jul 2021 15:45:34 -0400 Message-ID: <2039695.1625773534@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk [ redirecting to jdbc list ] Ivan Petrov writes: > Hi, I'm using postgres JDBC driver version 42.2.23 > https://mvnrepository.com/artifact/org.postgresql/postgresql/42.2.23 > Here is my exception > Bad value for type BigDecimal : Infinity; nested exception is > org.postgresql.util.PSQLException: Bad value for type BigDecimal : Infinity > ... > Caused by: org.postgresql.util.PSQLException: Bad value for type BigDecimal > : Infinity > at org.postgresql.jdbc.PgResultSet.toBigDecimal(PgResultSet.java:3064) > at org.postgresql.jdbc.PgResultSet.toBigDecimal(PgResultSet.java:3073) > at org.postgresql.jdbc.PgResultSet.getNumeric(PgResultSet.java:2491) I dunno, does BigDecimal have a concept of infinity? If not, this doesn't seem like something the driver can avoid for you. If it does, then something needs to be updated to be aware that PG now supports infinities in type numeric. regards, tom lane