[DB-SIG] Oracle no longer wants positional arguments!

Jim Fulton jim.fulton@Digicool.com
Tue, 23 Jun 1998 12:51:30 -0400

Paul Boddie wrote:
> Jim Fulton <jim.fulton@Digicool.com> wrote:
> > I happen to be working on a new Oracle module that needs to
> > work with Oracle 8 and I noticed something interesting.
> Right! I thought someone was working on a new module. Now I know I didn't just
> make it up!

I think that Anthony Baxter was working on a new oracle module too.
I suspect that that is who you were thinking of.

Alas, it looks like I'm not going to be able to release (at least not 
for free) the oracle module I'm working on now. (Waaaaaa!)

> > The Oracle OCI call, obindrn, that lets you use positional
> > placeholders, as in:
> >
> >   select * from spam
> >   where foo=:1
> >
> > is now considered "obsolete"!
> I noticed that named placeholders were supported in OCI, and wondered why they
> weren't utilised by oracledb...
> > Oracle wants you to use named variables, like:
> >
> >   select * from spam
> >   where foo=:foo
> >
> > Aparently, you were already (at least in Oracle 7)
> > not allowed to use positional placeholders in PL/SQL
> > blocks.
> >
> > Oops. ;-)
> In the PL/SQL probably not, but it is possible to call PL/SQL procedures using
> OCI with numbered placeholders.

But in Oracle 8, the ordered placeholder binding function, obindrn,
is flagged as "obsolete".  I take this to mean that obindrn is 
"deprecated" and should be avoided.
> > Maybe we should think about a less position-oriented interface,
> > perhaps using keyword arguments or a dictionary
> > to pass values into execute.
> >
> > (Note that I'd still prefer a more function-like
> >  interface, as in:
> >
> >    f=connection.prepare(some_sql)
> >    result=f(arg1=v1, arg2=v2)
> > )
> Hmmm... I think that (naming and notation issues introduced in the example above
> aside) dictionaries would provide a fairly convenient interface to the
> parameters of stored procedures, which I was working on for oracledb-0.1.3.
> I posted a bit of a concern about the disconnection/commit relationship in
> oracledb. Are you in a position to comment about that? (Given that the oracledb
> module is unsupported, of course.)

Not really.  I'm willing to apply a patch, if you think that the
current module is broken and explain the problem to me (in private 


Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for