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

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

From: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
To: "[JDBC]" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB
Date: 2010-08-16 15:10:49
Message-ID: 63F81398416E4A0E90B9208B087179F0@DEVELOP1 (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
> So _if_ the driver were to return Types.CLOB it would need to implement 
> getClob()/setClob() as well.
> I still think it would be more consitent, to flag those columns as CLOB 
> but I underst that it would require a lot more work than simply changing 
> the datatype return value.

I cannot see an argument for "more consistant".

Please read the following documentation taken from:

Mapping SQL and Java Types
NOTE: The material in this chapter is based on JDBCtm API Tutorial and 
Reference, Second Edition: Universal Data Access for the Javatm 2 Platform, 
published by Addison Wesley as part of the Java series, ISBN 0-201-43328-1.

The JDBC types CHAR, VARCHAR, and LONGVARCHAR are closely related. CHAR 
represents a small, fixed-length character string, VARCHAR represents a 
small, variable-length character string, and LONGVARCHAR represents a large, 
variable-length character string.

8.4.2 CLOB
The JDBC type CLOB represents the SQL3 type CLOB (Character Large Object).

A JDBC CLOB value is mapped to an instance of the Clob interface in the Java 
programming language. If a driver follows the standard implementation, a 
Clob object logically points to the CLOB value on the server rather than 
containing its character data, greatly improving efficiency. Two of the 
methods on the Clob interface materialize the data of a CLOB object on the 

In response to

pgsql-jdbc by date

Next:From: dmpDate: 2010-08-16 15:36:13
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB
Previous:From: Thomas KellererDate: 2010-08-16 14:52:58
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB

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