Re: Bad value for type BigDecimal : Infinity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Petrov <capacytron(at)gmail(dot)com>
Cc: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Re: Bad value for type BigDecimal : Infinity
Date: 2021-07-08 19:45:34
Message-ID: 2039695.1625773534@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-jdbc

[ redirecting to jdbc list ]

Ivan Petrov <capacytron(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sehrope Sarkuni 2021-07-09 13:52:48 Re: Bad value for type BigDecimal : Infinity
Previous Message Ivan Petrov 2021-07-08 18:37:44 Bad value for type BigDecimal : Infinity

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sehrope Sarkuni 2021-07-09 13:52:48 Re: Bad value for type BigDecimal : Infinity
Previous Message Ivan Petrov 2021-07-08 18:37:44 Bad value for type BigDecimal : Infinity