More on trim vs. HSQLDB (was Re: PostgreSQL Failures)

From: Holger Hoffstätte (holge..izards.de)
Date: Tue Mar 04 2003 - 09:46:33 EST

  • Next message: Andrus Adamchik: "Re: ObjRelationship isToMany"

    > Just one more point: this is also true for HSQLDB, it also needs trimming
    > for CHAR.

    Well, only sometimes (grr). Quoting from the hsqldb docs:

    "In HSQLDB, when defining CHAR and VARCHAR columns, the SIZE argument is
    optional and defaults to 0. If any other size is specified, it is stored
    in the database definition but is not enforeced by default. Once you have
    created the database (before adding data), you can close the database and
    add a database property value: sql.enforce_size=true
    This will enforce the specified size and pad CHAR fields with spaces to
    fill the size."

    Trying to trim when you can't be sure what the server's behavious is just
    leads to more trouble. I think this is another good argument in favor of
    not messing with array types at all.

    Holger



    This archive was generated by hypermail 2.0.0 : Tue Mar 04 2003 - 09:49:54 EST