Re: bpchat cannot exceed 10485760 - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: bpchat cannot exceed 10485760
Date
Msg-id Pine.BSO.4.56.0407080158470.28674@leary.csoft.net
Whole thread Raw
In response to bpchat cannot exceed 10485760  ("Amish Munshi" <amish_munshi@fastmail.fm>)
List 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

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: getXXX methods
Next
From: Dave Cramer
Date:
Subject: Re: getXXX methods