Hi,

>any(:any) = :a_1
>it should be :a_1 = any(:any)
>  
>
This looks like odd Postgres behaviour, the equals operator not quite 
being commutative.

We could add a Postgres-specifc workaround, in PGCompiler something like 
(untested):

    def visit_binary(self, binary):
        if isinstance(binary.left, sql._Function) and 
binary.left.name.lower() == 'any' and binary.operator == '=':
            binary.left, binary.right = binary.right, binary.left
        super(PGCompiler, self).visit_binary(binary)

The MSSQL dialect uses a similar trick to work around some adodbapi bugs.

Paul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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