Re: TEXT columns should indentify as java.sql.Types.CLOB - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: TEXT columns should indentify as java.sql.Types.CLOB
Date
Msg-id 4C6904C00200002500034672@gw.wicourts.gov
Whole thread Raw
In response to Re: TEXT columns should indentify as java.sql.Types.CLOB  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: TEXT columns should indentify as java.sql.Types.CLOB  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-jdbc
Thomas Kellerer <spam_eater@gmx.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

pgsql-jdbc by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB
Next
From: Thomas Kellerer
Date:
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB