Hi all,
I think I found a bug in the starts/endswith operators used contemporary with bindparam on a PostgreSQL db....
Take a look...

comune.select(comune.c.nome.startswith(bindparam('oper'))).execute(oper='my')

SQLError: (ProgrammingError) operator is not unique: "unknown" + "unknown"
HINT: Could not choose a best candidate operator. You may need to add explicit type casts. 'SELECT comune.id, comune.istat, comune.cod_provincia, comune.codice_erariale, comune.bdn_id, comune.nome, comune.cap, comune.data_inizio, comune.data_fine, comune.auto_sync_bdn \nFROM comune \nWHERE comune.nome LIKE (%(oper)s + %(literal)s)' {'oper': 'my', 'literal': '%'}
--------------
PostgreSQL uses || to concatenate strings instead of +...
--------------

comune.select(comune.c.nome.endswith(bindparam('oper'))).execute(oper='my')

TypeError: cannot concatenate 'str' and '_BindParamClause' objects

jo


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