Re: bpchat cannot exceed 10485760

From: Kris Jurka <books(at)ejurka(dot)com>
To: Amish Munshi <amish_munshi(at)fastmail(dot)fm>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: bpchat cannot exceed 10485760
Date: 2004-07-08 07:06:30
Message-ID: Pine.BSO.4.56.0407080158470.28674@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 8 Jul 2004, Amish Munshi wrote:

> Greetings,
>
> I am migrating a database from HSQLDB to Postgresql. I am using the
> HSQL Database manager to transfer my data from HSQL to postgres and
> found a hurdle.
> The exact error message is as follows.
>
> org.hsqldb.util.DataAccessPointException: ERROR: length for type bpchar
> cannot exceed 10485760
>

It is trying to create a table with a column type of char(N) with a very
large value of N, such as "CREATE TABLE tab (a char(100000000000));".
There doesn't seem to be a point in exactly specifying a size of greater
than 10M. The question is does your source database have a column defined
in this way? If not then perhaps the HSQL JDBC driver has a bug where it
doesn't return the correct length restriction for a char column. If you
do have a column defined this way you may be in trouble. Since char(N)
pads the data with spaces you cannot simply substitute and unbounded
character type (like "text").

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Amish Munshi 2004-07-08 07:16:54 bpchat cannot exceed 10485760
Previous Message Kris Jurka 2004-07-08 06:50:26 Re: getXXX methods