[DB-SIG] information needed

Dario Lopez-Kästen dario@ita.chalmers.se
Tue, 24 Sep 2002 21:22:54 +0200


----- Original Message -----
From: "Gerhard Häring" <gerhard.haering@opus-gmbh.net>
> * Srinivas Rao Kollipara <srinivas.rao.kollipara@ai.ag> [2002-09-20 10:26
+0200]:
> > Does anyone know any tools which will convert the python code to the
oracle
> > plsql code.
>
> I'd be very surprised if there were any, and I believe the chances of any
such
> thing ever appearing are close to zero. Btw. I'm writing a relatively
complex
> algorithm in Python right now, for which the ideal place to be executed
would
> be a stored procedure, but PL/SQL isn't quite up to the job as far as I
can
> see.  While it were possible to write this algorithm in PL/SQL, it would
be a
> major PITA, as PL/SQL seems to lack many of the interesting data
structures
> like dictionaries and lists, which would be clumsy to emulate via cursors,
> temporary tables and arrays. But then, I hardly know PL/SQL.
>
> OTOH if you use PostgreSQL, you can write your stored procedures in Python
:-)
> --

I hardly think that switching from oracle to Postgres is an option, if you
already have oracle expertise at hand...

Converting python to plsql should not be impossibly hard, though it might
prove a fair bit of a challenge, for the very reasons that Gerhard point
out, lack of nice data structures (though I might prefer python over pl/sql
i find that pl/sql is not as bad as you would come to expect).

You could use java, which can be run natively in the db, given a decently
recent oracle version, and which might be, from what I hear, even faster
than pl/sql.

Another high-tech, bleeding edge option would be to somehow convert python
to a shared library and use Oracle's nifty "use shared libraries trough
pl/sql" functionality to execute the python code "inside" the oracle
database... though I must confess I have not the faintest idea of how
feasible this is :)

Cheers,

/dario

- --------------------------------------------------------------------
Dario Lopez-Kästen, dario@ita.chalmers.se        IT Systems & Services
System Developer/System Administrator     Chalmers University of Tech.