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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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:
http://download-llnw.oracle.com/javase/1.3/docs/guide/jdbc/getstart/mapping.html

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.

8.3.1 CHAR, VARCHAR, and LONGVARCHAR
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
client.

In response to

Browse pgsql-jdbc by date

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