You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Robert Einsle <ro...@einsle.de> on 2005/11/16 15:14:25 UTC

Problem Using HsqlDb Platform

Hy,

we use for our Projekt HaslDb as Client Database. Creating Colums will 
produce an Output in hsql.script file:

CREATE MEMORY TABLE "einsatzarten"("obj_id" INTEGER DEFAULT 0 NOT NULL 
PRIMARY KEY,"eins_art_kz" CHAR(1),"memo_obj_id" INTEGER)

Queriieng hsqldb reports me Table not found. When i remove the " from 
the script-file, then the output in the script file is like:

CREATE MEMORY TABLE EINSATZARTEN(OBJ_ID INTEGER DEFAULT 0 NOT NULL 
PRIMARY KEY,EINS_ART_KZ CHAR(1),MEMO_OBJ_ID INTEGER)

and an Query reports ma the Data.

I think hsqldb-Platform creates the Tables with " and not with '.

Thanks

\Robert

Re: Problem Using HsqlDb Platform

Posted by Thomas Dudziak <to...@gmail.com>.
On 11/16/05, Robert Einsle <ro...@einsle.de> wrote:

> i looked at the Code, and i found, PlatformInfo is inserting
>
>     private String _delimiterToken = "\"";
>
> in Create-Statements in Hsql-Databases. I think, on HsqlDb you should
> not use the Delimiter here.

This is called delimited identifier mode and is required by the, I
think, SQL99 standard. In short, when using delimited identifiers, the
names of database entities (tables, columns, etc.) can contain any
unicode character (including whitespaces) and be equal to reserved
words. Without them, the identifiers can contain only ascii
characters, and the database will always convert them to uppercase.
For details on how Hsqldb handles that, see the name section here:

http://hsqldb.sourceforge.net/doc/guide/ch09.html#expression-section

However, you should then always use delimited identifier mode, e.g. a
SELECT without the double quotation marks is likely to fail.

You can turn off the identifier mode that DdlUtils uses, using the
usedelimitedidentifiers attribute in the Ant tasks, and vie the
Platform.getPlatformInfo().setUseDelimitedIdentifiers method.

Tom

Re: Problem Using HsqlDb Platform

Posted by Robert Einsle <ro...@einsle.de>.
Hy,

i looked at the Code, and i found, PlatformInfo is inserting

    private String _delimiterToken = "\"";

in Create-Statements in Hsql-Databases. I think, on HsqlDb you should 
not use the Delimiter here.

Thanks.

\Robert

Robert Einsle schrieb:

> Hy,
>
> we use for our Projekt HaslDb as Client Database. Creating Colums will 
> produce an Output in hsql.script file:
>
> CREATE MEMORY TABLE "einsatzarten"("obj_id" INTEGER DEFAULT 0 NOT NULL 
> PRIMARY KEY,"eins_art_kz" CHAR(1),"memo_obj_id" INTEGER)
>
> Queriieng hsqldb reports me Table not found. When i remove the " from 
> the script-file, then the output in the script file is like:
>
> CREATE MEMORY TABLE EINSATZARTEN(OBJ_ID INTEGER DEFAULT 0 NOT NULL 
> PRIMARY KEY,EINS_ART_KZ CHAR(1),MEMO_OBJ_ID INTEGER)
>
> and an Query reports ma the Data.
>
> I think hsqldb-Platform creates the Tables with " and not with '.
>
> Thanks
>
> \Robert
>