Re: Again the JSCreator and Metadata issues

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <books(at)ejurka(dot)com>,<op217537(at)mail(dot)telepac(dot)pt>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Again the JSCreator and Metadata issues
Date: 2005-11-21 19:46:22
Message-ID: 4381CFAE02000025000008B2@gwmta.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

No objection here -- I don't know how else to interpret the docs
for this method, which is supposed to return:

"the normal maximum number of characters allowed as the width
of the designated column"

Any GUI app should be prepared to truncate or wrap large values.

-Kevin

>>> Kris Jurka <books(at)ejurka(dot)com> >>>

On Thu, 17 Nov 2005, pedro farinha wrote:

I believe you have a variable length field in your table. Sun's
CachedRowSet implementation examines the ResultSetMetaData and creates
its
own copy of it. The postgresql JDBC driver returns -1 for
ResultSetMetaData.getColumnDisplaySize() meaning unknown for variable
length fields, like say a column of type "text". Sun does not like this

value and reports an error. In the past we've tried to ask Sun for some

advice in this area and got nothing in response. Other than -1 the
only other real defensible value for getColumnDisplaySize would
probably be Integer.MAX_VALUE. We've been concerned that GUIs would
try to actually use this provided value and they would blow up, but
the only complaints we've heard are from people disliking the -1
value and this problem doesn't seem to be going away.

I suggest we try returning Integer.MAX_VALUE for a while and see what
complaints we get. Objections?

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-11-21 23:06:37 Re: Deadlock problem
Previous Message Vit Timchishin 2005-11-21 12:09:12 Re: Deadlock problem