Re: TEXT columns should indentify as java.sql.Types.CLOB

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Thomas Kellerer" <spam_eater(at)gmx(dot)net>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB
Date: 2010-08-16 14:28:32
Message-ID: 4C6904C00200002500034672@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thomas Kellerer <spam_eater(at)gmx(dot)net> wrote:
> Oliver Jowett wrote on 16.08.2010 13:18:

>> Returning Types.CLOB would imply that the preferred way to deal
>> with those columns is via getClob() / setClob(), which surely
>> isn't correct for TEXT columns in most cases?
>>
>
> Not necessarily.
>
> Almost all drivers I know (Oracle, jTDS, MySQL and DB2 I think)
> can handle getString() on a CLOB column without problems. (Oracle
> only since it's 10.x drivers)

I'm with Oliver. I've developed a lot of highly portable code, and
*my* assumption would be that a column categorized as Types.CLOB
would support getClob() / setClob(). That it might or might not
support getString() seems pretty irrelevant to the issue.

Your argument seems to be that if something behaves like character
varying without the length limitations of some other database
products on such types, it should be considered CLOB. I think it
should be related to whether the CLOB access methods are supported.

-Kevin

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2010-08-16 14:52:58 Re: TEXT columns should indentify as java.sql.Types.CLOB
Previous Message Thomas Kellerer 2010-08-16 13:47:49 Re: TEXT columns should indentify as java.sql.Types.CLOB