Subject Re: [firebird-support] Use of double quoted names in Firebird
Author Martijn Tonies
> > In the good old days identifiers were always UPPER_CASE and I prefer to
> > retain that convention. Using lower case when writing scripts was
> > possible, but keeping to the UPPER_CASE version made everything
> > consistent, and as I remember dBase would use any valid UPPER_CASE
> > character set as long as you did not try and mix them.
>
> Consistent for whom? As Martijn has mentioned, some languages might
> differ from others in how case conversion works. So, having case
> insensitive identifiers is bound to cause problems unless we stick to
> ASCII only.

I think that if the engine treats plain sql (so not quoted) as lowercase,
it might work? But then again, I might be wrong.

> IMO, quotes are even stronger markers that "this is an identifier" than
> uppercase is. Especially since the SQL itself can be written in
> uppercase, e.g.
>
> SELECT MYTHING
> FROM THATTABLE
> WHERE SOMETHINGELSE = :MYPARAM
> ORDER BY THELARCH
>
> is not as easy to read as this:
>
> SELECT "MyThing"
> FROM "ThatTable"
> WHERE "SomethingElse" = :MyParam
> ORDER BY "TheLarch"
>
> or this:
>
> select "MyThing"
> from "ThatTable"
> where "SomethingElse" = :MyParam
> order by "TheLarch"

Actually, I hate the quoted variants. This is a matter of taste.

Personally, I'd probably write:

select MyThing
from ThatTable
where SomethingElse = :Param
order by TheLarch

or even upper the SELECT and stuff. So, using camelcase, but not
defining the object as such.

On the other hand, I might mix everything as I'm using a syntax
highlighted editor anyway :-) ... Now, THAT makes things easy.


With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com