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

Jim Fulton jim.fulton@Digicool.com
Tue, 23 Jun 1998 11:45:15 -0400


I happen to be working on a new Oracle module that needs to
work with Oracle 8 and I noticed something interesting.

The Oracle OCI call, obindrn, that lets you use positional
placeholders, as in:

  select * from spam
  where foo=:1

is now considered "obsolete"!

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. ;-)

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

Jim

--
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
repeats.