Home
Analytics
Problem with PostgreSQL's bigints
ghis_mtp
Hi everybody,<br />
<br />
I'm facing a strange problem querying bigint columns in a PostgresqlDatabase.<br />
This error always occurs when bigint value is upper than Java's int type max range value. <br />
This behavior is normal form me (it's a car problem). But I don't understand why Birt is unable to map my bigints columns to "Long" typed output columns. I only can select types of String, Decimal, Integer, Boolean, Date Time, Date Float and Time. <br />
Is it normal ? Or is it due to a misconfiguration ?<br />
<br />
Here is the error output :<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>A BIRT exception occurred.
Plug-in Provider:Eclipse BIRT Project
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:3.7.1.v20110905
Error Code:odaconsumer.CannotGetIntFromColumn
Error Message:Cannot get the integer value from column: 9.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot get integer value in the result set.
SQL error #1:Bad value for type int : 8574615378
;
org.postgresql.util.PSQLException: Bad value for type int : 8574615378
</pre>
<br />
Regards,<br />
<br />
Ghislain
Find more posts tagged with
Comments
mwilliams
Above is the length a value has to be to fail? Can you bring the value in as a string and use script to parse it into the type you need it to be in?
Tubal
You can use the 'Float' datatype in BIRT for bigint.
ghis_mtp
<blockquote class='ipsBlockquote' data-author="'Tubal'" data-cid="95208" data-time="1328728568" data-date="08 February 2012 - 12:16 PM"><p>
You can use the 'Float' datatype in BIRT for bigint.<br /></p></blockquote>
It works ! Thanks
mwilliams
Thanks, Tubal!