Re: [cx-oracle-users] ORA-01790 error on union all with nullable bind variables
Brought to you by:
atuining
From: Mikhail N. <mn...@ya...> - 2016-04-19 05:46:37
|
I guess it's better approach then calling cast inside queries. I ask a question to devs about it. Thanks! On Tue, 2016-04-19 at 08:06 +0300, Jani Tiainen wrote: > Right, that was it. :) > > I remember that we hit this exact problem in Django Oracle GIS > backend > with null geometries quite a long time ago. > > On 18.04.2016 16:19, Anthony Tuininga wrote: > > Yes. cx_Oracle assumes that None is bound as a string. You can tell > it > > you know better. :-) > > > > cursor.setinputsizes(arg0 = cx_Oracle.NUMBER) > > cursor.execute("select 1 from dual union all select :arg0 from > dual", > > arg0 = None) > > cursor.fetchall() > > [(1,), (None,)] > > > > Anthony > > |