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

Re: text type handling

From: "Ken Boss" <Ken(dot)Boss(at)dnr(dot)state(dot)mn(dot)us>
To: "Kris Jurka" <books(at)ejurka(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: text type handling
Date: 2008-12-03 14:43:18
Message-ID: 493646A6.26F2.0021.0@dnr.state.mn.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
Thanks much for your response, Kris.  I have been able to make things work for my purposes by applying the patch suggested by Daniel Migowski in the thread referenced below.  I tried to implement your suggestion as well, but know only enough to be dangerous.  Returning Integer.MAX_VALUE from the Oid.TEXT case in the getPrecision method of TypeInfoCache.java had no discernible effect - I must have been coding in the wrong place.  At any rate, I will look forward to that fix in the next release.

Thanks again,

--Ken

>>> On 12/2/2008 at 4:40 PM, in message
<Pine(dot)BSO(dot)4(dot)64(dot)0812021736080(dot)1073(at)leary(dot)csoft(dot)net>, Kris Jurka
<books(at)ejurka(dot)com> wrote:

> 
> On Tue, 2 Dec 2008, Ken Boss wrote:
> 
>> ... that postgres text datatypes appear to Crystal as String fields of 
>> length -1, which confuses the software and prohibits their use.  This is 
>> particularly problematic given postgresql's proclivity for casting the 
>> results of concatenations, unions, etc. to text on-the-fly.
>>
>> I see a long thread related to this topic from about a year ago here: 
>> http://archives.postgresql.org/pgsql-jdbc/2007-12/msg00145.php , but it 
>> seems to have run its course without coming to any specific conclusions.
> 
> The conclusion that Oliver and I seemed to come to was that the type 
> returned should not be changed, but instead the precision should be 
> changed from -1 to Integer.MAX_VALUE.  This change hasn't been made yet, 
> but that will happen before the 8.4 release.  This change won't be 
> backpatched to earlier driver releases for backwards compatibility 
> reasons.
> 
> Kris Jurka


In response to

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2008-12-03 19:52:08
Subject: Re: text type handling
Previous:From: Oliver JowettDate: 2008-12-03 01:53:32
Subject: Re: Connect via odbc from Windows to Linux

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