Subject Re: [firebird-support] Upper case behaviour
Author Martijn Tonies
> > > Ah, so the problem arises when un-quoted and quoted usage is both used
> > over
> > > time. Why would anyone do that or why would a tool do that?
> >
> >Why is a hard question to answer. If you get your table list by
> >parsing the output of SHOW TABLES, there's not a lot of place for
> >the database to put flags saying "this is pretty printed for the
> >user, but is not really a delimited identifier." You're reduced
> >to the rules that Martijn described ... and that means you quote
> >anything you find with lower case letters.
> >
> >Why would any tool parse the output of SHOW TABLES ... well, maybe
> >because that's as close to a universal metadata interface as exists.
> >And the Information Schema (which should be that interface) doesn't
> >offer any help on delimited vs. preserved either.
>
> Thanks for clarifying, Ann!
>
> I would think the SHOW TABLES output would, itself, quote the identifiers
> that were originally created as quoted identifiers.

Well, I very much doubt anyone using SHOW TABLES, cause I think
that's really isql.

The tool developers are using the system tables and currently there's
simply no column that says: this is the case preserving name.

So you end up with 1 column of table names with values like:

MyTABLE
MYTABLE
MyTAble

These are 3 different tables, obviously, MYTABLE can be used unquoted
(all uppercase), and the other ones need to be quoted. Why? Because they
contain mixed case identifiers.

If this would be case preserving, but not case sensitive, you would not be
able to create these tables ( for the love of whatever, I wouldn't know why
someone would, but that's a different story).

Now personally, I "dislike" the whole quoting thing. Which is why Database
Workbench only quotes when required: mixed case or special characters.

Most tools simply always quote when creating the metadata, to avoid these
checks. With case preserving, this would fail (creating case sensitive
objects),
but with special characters, they object names should be quoted.

Or are you trying to make things even more complicated? :-)

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com