Skip site navigation (1) Skip section navigation (2)

ResultSetMetaData.getColumnDisplaySize returns 2147483647 ?

From: DGPickett <DGPickett(at)aol(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: David(dot)Pickett(at)nasdaqomx(dot)com
Subject: ResultSetMetaData.getColumnDisplaySize returns 2147483647 ?
Date: 2009-02-25 16:33:36
Message-ID: 095cddc9-bca7-41a5-84a8-0faca7adadc2@f11g2000vbf.googlegroups.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Selecting a constant string or concatenated columns from postgres
using jisql (xigole), I get heap overflow.

select 'X' AS XXX from . . . .
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.lang.AbstractStringBuilder.<init>
(AbstractStringBuilder.java:45)
        at java.lang.StringBuffer.<init>(StringBuffer.java:91)
        at com.xigole.util.sql.Jisql.formatLabel(Jisql.java:720)
        at com.xigole.util.sql.Jisql.doIsql(Jisql.java:352)
        at com.xigole.util.sql.Jisql.run(Jisql.java:225)
        at com.xigole.util.sql.Jisql.main(Jisql.java:207)
        0

This discussion seems to say this is a postgres JDBC bug:

 http://forums.hotjoe.com/posts/list/315.page

I tried going back to the last rev 7 JAR, and these queries work,
albeit with 65K column widths.  Something is seriously wrong in this
method, if it cannot size a three byte label or a one byte constant
string.

Responses

pgsql-jdbc by date

Next:From: Jesus MaudesDate: 2009-02-25 23:51:07
Subject: Why driver does not need to be registered?
Previous:From: Saleem EDAH-TALLYDate: 2009-02-23 14:53:02
Subject: Re: SSL - Providing client certificates

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group