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

Re: Column size BUG with text/bytea with 7.4 JDBC Driver

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: Column size BUG with text/bytea with 7.4 JDBC Driver
Date: 2004-04-11 01:36:37
Message-ID: Pine.BSO.4.56.0404102033260.30692@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Wed, 7 Apr 2004, j.random.programmer wrote:

> The latest JDBC driver (build 213) has a serious
> bug for the "COLUMN_SIZE" value, obtained via
> DBMetaData, getColumns() and then "COLUMN_SIZE. 
> 
> The column size returned for both bytea and text
> types is -1.
> 
> postgres _should_ return the max col size which
> for bytea is about 1 GB (or is it 4 GB theoretically)
> 

For bytea 1GB would be a reasonable limit, but for text it is more 
difficult to say what the maximum size is because the maximum size for 
varchar fields is measured in the number of characters, not the number of 
bytes.  The 1GB limit is a byte count limit, not a character count limit, 
so what would you recommend returning in the presence of a non single byte 
encoding?

Kris Jurka


In response to

Responses

pgsql-jdbc by date

Next:From: Giuseppe SaccoDate: 2004-04-11 07:50:29
Subject: Re: problem in connetting using reflection
Previous:From: Kris JurkaDate: 2004-04-11 01:28:51
Subject: Re: problem in connetting using reflection

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