I am using SQLAlchemy 0.8.1 with a Postgres backend, and have noticed that 
the ilike operator does not seem to be compiling to an ILIKE operator in 
raw SQL, but instead it is doing lower() on both sides of the comparison:

E.g. (names changed to protect the innocent)

>> s = session()

>> print s.connection().engine
Engine(postgresql://user:passwd@server:port/database)

>> q = s.query(Table).filter(Table.column.ilike("FISH%"))

>> print q
SELECT column
FROM table
WHERE lower(column) LIKE lower(:column_1)

This could be a bug with what is printing out the SQL? I looked at the 
source code and the Postgres dialect is supposed to use ILIKE here. Any 
idea why this is not happening?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to