Subject | Re: [firebird-support] Max identifier length? |
---|---|
Author | Martijn Tonies |
Post date | 2009-03-19T07:16:17Z |
Hello Kjell,
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
>> > Is it correct that FB stores identifier names in a system table with aI'm not sure, I only know it's on the roadmap somewhere.
>> > column width of 31 8-byte characters? It seems to me that this is the
>>
>> 8-bit?
>
>:-) Yes, obviously!
>
>> It stores names in UNICODE_FSS characterset.
>
>Which is a variable length encoding, right?
>
>> > 2. Any plans to increase the max length in general, regardless of
>> > encoding?
>>
>> Yes.
>
>Good! In 2.5 or 3.0 or later?
>> > Yes, I do have use for longer names, and yes, I do hate that the maxInteresting case.
>> > length varies depending on the actual characater content.
>>
>> What gives you that idea?
>
>Try this in a DB with default charset UTF8:
>
>// Table name is 31 ASCII characters.
>// Works fine.
>create table "X234567890123456789012345678901" (
> "Dummy" int
>);
>
>// Table name is 31 characters, but one of them is not ASCII.
>// Fails - identifier too long.
>create table "X23456789012345678901234567890Ä" (
> "Dummy" int
>);
>
>// Table name is 30 characters, one of which is not ASCII.
>// Works fine.
>create table "X2345678901234567890123456789Ä" (
> "Dummy" int
>);
>
>// Table name is 30 characters, two of which is not ASCII.
>// Fails - identifier too long.
>create table "X234567890123456789012345678ÖÄ" (
> "Dummy" int
>);
>
>// Table name is 29 characters, two of which is not ASCII.
>// Works fine.
>create table "X23456789012345678901234567ÖÄ" (
> "Dummy" int
>);
>This would, if I'm not misunderstanding things, show that the table nameIndeed.
>can be max 31 bytes long, and it's stored in a format like UTF8 where
>ASCII is stored as 8 bit/char, while Ä and Ö is stored as 16 bit/char. I
>expect other codepoints to use three or more bytes, further reducing the
>max number of codepoints that can be used in the identifier.
>
>It would seems more "useful" if the max length were 31 Unicode codepoints.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com