[orm-devel] select problem

Diedrich Vorberg orm-devel@mailman.tux4web.de
Sun, 2 Mar 2003 20:44:35 +0100


Hi Ross,

>PostgreSQL,
>on the other hand, downcases everything, the way C programmers like it. ;-)
That's why it never showed up, I stuck to lower case identifiers.

>The problem arised, then, when the case-altered value is returned, and
>compared in python (which, of course, is case sensitive)
Agreed.

>Hmm, it's not FireBird that's having the problem with column names, I think:
>it's orm. Be careful about up/down casing, since the SQL spec says these
>names can be _anything_ if quoted properly: 
>
>SELECT "#" from "My Really silly-tablename"
>
>is perfectly valid SQL.

ORM aims at making SQL identifiers independent from SQL 
identifiers. You can use a 

  columnName

attribute with every datatype in your columns dict and you can set the

  tableName

attribute in each of your dbclasses. The problem is, that cases in 
which these are anything else but valid lowercase Python identifiers 
is not tested very well. That's why the comparison issue never showed 
up. Also, the SQL syntax using quotes is never used so you'd end up 
having the same problem.

As you pointed out above it does not make a great deal of sense to 
use anything but "Python like" identifiers in SQL. How desireble is 
it for ORM to consider this case and modify the procedures that 
create SQL statements accordingly?

>Ross
Thanks for pointing this our Ross!

Diedrich


-- 
           _..._                            Diedrich Vorberg
         .'     '.
        /  _   _  \                         http://www.tux4web.de
        | (o)_(o) |                         info@tux4web.de
         \(     ) /            .---.
         //'._.'\ \           /     \       Internet Dienstleistungen
        //   .   \ \          \.@-@./       und 'Consulting'.
       ||   .     \ \         /`\_/`\
       |\   :     / |        //  _  \\      Linux Rules!
       \ `) '   (`  /_      | \     )|_
     _)``".____,.'"` (_    /`\_`>  <_/ \
     )     )'--'(     (    \__/'---'\__/
      '---`      `---`