> > It's not about case in the resultproxy, it's about case-insensitive
> > for server-side compare, such as in the where clause and when ordering
> > results.
>
> comparisons....like literal text injected into the SQL?  why not use
> bind parameters ?    there are cases where literal text should not be
> quoted, i.e. if you hardcoded "where x = 'SomeString'"..but its
> possible that the quoting is too eager right now due to some recent
> issues.  in any case need an example what you mean.

It's not just the literal text or the bind param.  It is how the
server compares character based data.  In MySQL, MS-SQL, Sybase --
case does not matter.  In Postgres, Oracle and DB2 it does.  DB2 and
Oracle (since version 10 I think) have some server-side settings to
help, but Postgres does not.

Assuming I have a table named "people":

fname          lname
========= ============
Troy             Kruthoff
albert           einstein

and the query: "select fname from people order by fname asc"

in MySQL:
-> albert
-> Troy

in Postgres:
-> Troy
-> albert

and the query: "select fname from people where fname='troy'"

in MySQL:
-> Troy

in Postgres:
-> [no records found/returned because "Troy"!="troy"]

So, we need to tell postgres: "select fname from people order by
lower(fname) asc" and "select fname from people where
lower(fname)='troy'"

Notice I am not needing to lower (or upper) the column as part of the
select list, because I want the data to return to the app as it exists
in the db server.

Does this help?  Maybe I can buy you a beer at PyCon and we can talk
it through?

Thanks,

Troy




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to