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

Re: Bug in 7.4_213 driver: returns VARCHAR instead of

From: Kris Jurka <books(at)ejurka(dot)com>
To: "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug in 7.4_213 driver: returns VARCHAR instead of
Date: 2004-07-29 21:54:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

On Thu, 29 Jul 2004, Kris Jurka wrote:

> On Tue, 27 Jul 2004, j.random.programmer wrote:
> > The JDBC version 7.4_213 driver has the following bug
> > 
> > For database SQL type:
> > text	(that is variable unlimited length)
> > 
> > The JDBC driver returns "java.sql.VARCHAR" as
> > the column type. (via database meta data).
> > 
> > This is wrong. The JDBC driver SHOULD return
> > java.sql.LONGVARCHAR (since the text type is
> > of unlimited length).
> > 
> I'm not sure this is clearly wrong, but you do make a convincing argument.

I'm not so sure anymore.  While text can be used for storing large values
it often isn't.  Further returning LONGVARCHAR could be a sign for the
caller to use something like ResultSet.getCharacterStream instead of a
simple getString.

Kris Jurka

In response to


pgsql-jdbc by date

Next:From: Oliver JowettDate: 2004-07-29 22:14:29
Subject: Re: Java Studio Creator and postgresql jdbc
Previous:From: Kris JurkaDate: 2004-07-29 21:41:49
Subject: Re: Wrong column names in ResultSetMetaData

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