Re: ORA-01790 error on union all with nullable bind variables
Mikhail Nacharov <[email protected]> Tue, 19 Apr 2016 10:46:27 +0500
| Newsgroups | gmane.comp.python.db.cx-oracle |
|---|---|
| Message-ID | <[email protected]> |
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
> >
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z