[odb-users] ODB compiler for oracle, double qoutes SQL?statements

Boris Kolpackov boris at codesynthesis.com
Wed Nov 21 07:11:29 EST 2012


Hi Tony,

Tony Rietwyk <tony at rightsoft.com.au> writes:

> Maybe ODB needs something similar - possibly even just a regex for
> valid id's, and only quote the id if that doesn't match?

I believe that would open a can of worms. IMO, this whole idea of
Oracle being case sensitive yet converting all unquoted identifiers to
upper case is a misfeature, to put it mildly. Consistently quoting all
the identifiers everywhere seems like the most straightforward way to
sidestep all this mess.

If we only quote keywords, not only will we have to maintain a list
of all known keywords for each database, but we will also have an
inconsistency of non-keywords being converted to upper case while
quoted keywords keeping their original case. Consider:

CREATE TABLE Chair ...;
CREATE TABLE "Table" ...;

The first table will be called CHAIR while the second -- Table.

Perhaps a better solution would be to provide an option which
instructs the ODB compiler to convert all the database identifiers
to upper case. While ODB internally will still use quotes, one
will be able to write custom SQL without quoting and rely on
Oracle to implicitly uppercase the identifiers.

What do you think?

Boris



More information about the odb-users mailing list