Обсуждение: bpchat cannot exceed 10485760

Поиск
Список
Период
Сортировка

bpchat cannot exceed 10485760

От
"Amish Munshi"
Дата:
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. I hope this is not a bug. I have approx 50MB of SQL
   database in HSQL. After doing a "transfer" of some tables it stops
   transfer for the rest crying "bpchar cannot be greater than a
   *certain* size". *certain* - >  approx 10 million or greater. I tried
   transferring one of the problematic table (using dbmanager) and it
   fails as well with same error.

   The exact error message is as follows.




org.hsqldb.util.DataAccessPointException: ERROR:  length for type bpchar
cannot exceed 10485760

        at org.hsqldb.util.TransferDb.execute(Unknown Source)
        at org.hsqldb.util.TransferTable.transferStructure(Unknown
        Source)
        at org.hsqldb.util.Transfer.transfer(Unknown Source)
        at org.hsqldb.util.Transfer.actionPerformed(Unknown Source)
        at java.awt.Button.processActionEvent(Button.java:382)
        at java.awt.Button.processEvent(Button.java:350)
        at java.awt.Component.dispatchEventImpl(Component.java:3615)
        at java.awt.Component.dispatchEvent(Component.java:3477)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
        at
        java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
        at
        java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
        at
        java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
        at
        java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
        at
        java.awt.EventDispatchThread.run(EventDispatchThread.java:100)





      I assumed it was an HSQL bug, but I hacked a little more and find
      that there is probably a postgresql involved in this problem.

   Any clues or pointers on how should I transfer the data? Or some
   pointers on where the problem actually is would be of great help.




 Regards.
Amish K. Munshi.
Always Available, Everywhere.


Re: bpchat cannot exceed 10485760

От
Kris Jurka
Дата:

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