Subject | Re: [firebird-support] Upper case behaviour |
---|---|
Author | Ann W. Harrison |
Post date | 2007-12-05T16:43:16Z |
Eugen.Konkov@... wrote:
to other identifiers by converting each lower case letter in the
identifier to its upper case equivalent(s). Thus the regular
identifier BigTable is compared with other identifers by replacing
the lower case i with an upper case I and the lower case g with
an upper case G, and the a with an A, and the b with a B and the
l with an L and the e with an E. BIGTABLE. "BigTable" is a
delimited identifier and the standards says it is to be compared
exactly as presented, after stripping the delimiter characters.
BIGTABLE is not the same as BigTable.
two types of identifier: delimited and regular.
their scope. You can have a table A and a field A and a procedure A
and a constraint A. They're all different scopes.
is the same as the regular identifier a.
identifier A as its name.
identifier A.
exactly matches "A".
support Firebird. Making arbitrary and non-standard changes that break
their tools will not improve the general adoption of Firebird. IMHO.
Best regards,
Ann
>> Sure. You do this:Because the standard says that regular identifiers are compared
>> create table BigTable (BigField varchar (20000));
>> The metadata is stored preserving case. A portable tool does a
>> show tables to get its table list and sees
>> ...
>> BigTable
>> ...
>> It then generates a query
>> select * from "BigTable";
>> Which fails because "BigTable" is not the same as BigTable under
>> the ISO SQL Standard.
>
> Why are those not the same?
to other identifiers by converting each lower case letter in the
identifier to its upper case equivalent(s). Thus the regular
identifier BigTable is compared with other identifers by replacing
the lower case i with an upper case I and the lower case g with
an upper case G, and the a with an A, and the b with a B and the
l with an L and the e with an E. BIGTABLE. "BigTable" is a
delimited identifier and the standards says it is to be compared
exactly as presented, after stripping the delimiter characters.
BIGTABLE is not the same as BigTable.
>No it doesn't. It says that object names are identifiers and there are
> Another question: SQL says that object names must not be case sensetive
two types of identifier: delimited and regular.
> soI'm not sure what you're getting at. Identifiers must be unique in
> 'create table a (...)' will seccess and second 'create table A (...)' must fail
> because of you can not create object with name of object which is already in database
> So that is a BUG when FireBird allow to create two objects 'a' and 'A' in the same database
their scope. You can have a table A and a field A and a procedure A
and a constraint A. They're all different scopes.
>No, it creates a table with the regular identifier A as its name. That
> Other cases:
> 'create table a (...)' will create table 'a' in database
is the same as the regular identifier a.
> soRight, bur for the wrong reason. There is a table with the regular
> 'create table A (...)" must fail because of there is the object 'a' in database
identifier A as its name.
> 'create table "a" (...)" must fail because of there is the object 'a' in databaseWrong. A delimited identifier "a" is different from a regular
identifier A.
> 'create table "A" (...)" must fail because of there is the object 'a' in databaseRight, for the wrong reason. There is already a table whose name
exactly matches "A".
>We don't control the tools and we're very happy that the tool builds
>
> FireBird just return names AS IS and tools must show names AS IS so there will not any ambigious
support Firebird. Making arbitrary and non-standard changes that break
their tools will not improve the general adoption of Firebird. IMHO.
Best regards,
Ann