BigDecimal instead of Integer in 7.1 - Mailing list pgsql-jdbc

From Joseph Shraibman
Subject BigDecimal instead of Integer in 7.1
Date
Msg-id 3AEE20E0.C165C94B@selectacast.net
Whole thread Raw
Responses Re: BigDecimal instead of Integer in 7.1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
I just upgraded from 7.0.3 to 7.1.

I have a query like this:
SELECT l, (SELECT COUNT(*) FROM ms WHERE ms.p = 4 AND ms.s = 2),
COUNT(DISTINCT m.uid), COUNT(m.oid), AVG(m.msgs::int), SUM(m.msgs::int)
FROM m, a WHERE key = 4 AND m.p = 4 GROUP BY l;

The problem is suddenly in 7.1 the result of the subselect used to
return an Integer now returns a BigInteger and is causing
classCastExceptions in my code.  What gives?



--
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio.  http://www.targabot.com

pgsql-jdbc by date:

Previous
From: Ned Wolpert
Date:
Subject: Re: JDBC Pooling driver
Next
From: Tom Lane
Date:
Subject: Re: BigDecimal instead of Integer in 7.1