Hello,

I'm using SQLAlchemy 0.3.5, and it seems that the func() output is 
broken with some functions.
I use the ANY function of PostgreSQL with something like :
func.any(q.c.habitats)==filter_habitat

SQLAlchemy translates this in:
WHERE any(habitats) = %(any)s, which is incorrect.


For example:

the result should be :
iasdev=> select true as result where 'abc' = ANY(array['abc', 'def']);
 result
--------
 t

where SQLAlchemy generates the query as :

iasdev=> select true as result where ANY(array['abc', 'def']) = 'abc';
ERROR:  syntax error at or near "ANY" at character 29
LINE 1: select true as result where ANY(array['abc', 'def']) = 'abc'...

Is this a bug ? (or maybe it's possible to keep the order...) ?

Thanks,
Julien

-- 
Julien Cigar
Belgian Biodiversity Platform
http://www.biodiversity.be
Université Libre de Bruxelles (ULB)
Campus de la Plaine CP 257
Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entrée ULB 2
B-1050 Bruxelles
office: [EMAIL PROTECTED]
home: [EMAIL PROTECTED]
biobel reference: http://biobel.biodiversity.be/biobel/person/show/471


--~--~---------~--~----~------------~-------~--~----~
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