Plešatejvlk's blog

My o vlku a vlk na blogu!

Přípravky na hubení bezdrátových myší

Kontextový engine se má ještě co učit..;)

HSQLDB schema character set

As of today, the otherwise pretty thorough official hsqldb user guide does not specify syntax for defining schema character set. It seems like the language definition part of create schema statement has been ommited and google nor stackoverflow returns any helpful hints (yet).

So if you struggle to get the syntax right, there it goes:

CREATE SCHEMA <your-schema-name> DEFAULT CHARACTER SET <charset: UTF8,...>

I know it looks pretty obvious but it took me almost half an hour to figure out the ‘default’ keyword.:/ Hope you get it faster.;)

You can find this definition in the user guide:

<schema definition> ::= CREATE SCHEMA <schema name clause> [ <schema character set
 specification> ] [ <schema element>... ]

But only the <schema name clause> and <schema element> clauses are defined later. It would be convenient (for the sake of completeness) if following clause would follow:

<schema character set specification> ::= DEFAULT CHARACTER SET <charset: UTF8,...>

Skotská momentka

Na opuštěném ostrově Sky..

Na opuštěném ostrově Sky

Follow

Get every new post delivered to your Inbox.