From: Oliver Jowett <oliver@opencloud.com>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB
Date: Mon, 16 Aug 2010 23:18:25 +1200
Message-ID: <4C691E81.903@opencloud.com> (raw)
In-Reply-To: <i4b0ep$a39$1@dough.gmane.org>
References: <E6A9CAA76548CB4EB02D2E3B174DD3B155381F0DF3@ink.sad.syncrontech.com>
<i4b0ep$a39$1@dough.gmane.org>
Thomas Kellerer wrote:
> Toni Helenius wrote on 16.08.2010 11:01:
>> I'm using Postgres 8.3.11 database and the latest JDBC driver 8.4
>> Build 701 (JDBC 4) + Java 6. In our databases there are TEXT type
>> columns. However if I make a query to identify these fields in Java,
>> the field DATA TYPE is VARCHAR and the length is 2147483647. Type
>> name is correct; "TEXT". But as we need database independent code, we
>> are using DATA TYPE as I presume is correct. And I think these TEXT
>> fields should return java.sql.Types.CLOB as DATA TYPE instead of
>> VARCHAR.
>
> I agree, this would make the driver more JDBC compatible and it would
> behave more like other drivers.
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?
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, spam_eater@gmx.net
Subject: Re: TEXT columns should indentify as java.sql.Types.CLOB
In-Reply-To: <4C691E81.903@opencloud.com>
References: <E6A9CAA76548CB4EB02D2E3B174DD3B155381F0DF3@ink.sad.syncrontech.com> <i4b0ep$a39$1@dough.gmane.org> <4C691E81.903@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox