vb_bv wrote:[color=blue]
> Does Pyton PL/SQL programming language of Oracle support?
>
> Thx[/color]
PL/SQL is only supported *inside* Oracle databases. Python can be used
to call PL/SQL procedures (I recommend the cx_Oracle module), but you
can't run Python inside the database like PL/SQL.
infidel wrote:[color=blue]
> vb_bv wrote:
>[color=green]
>>Does Pyton PL/SQL programming language of Oracle support?
>>[/color]
> PL/SQL is only supported *inside* Oracle databases. Python can be used
> to call PL/SQL procedures (I recommend the cx_Oracle module), but you
> can't run Python inside the database like PL/SQL.[/color]
If one is really really really insisting on running Python code inside
an Oracle database, I think it could be done: you can write Oracle
stored procedures in C libraries, Java libraries and even .NET libraries
(10g on win32). And there are Python implementations for C, Java and .NET.
So much for the theory.
In my not so humble opinion, instead of all this fancy stuff, you will
be better off writing your stored procedures in PL/SQL, which is a very
good language for manipulating data, and writing portable, efficient and
maintainable server-side database code.
Gerhard Häring <gh@ghaering.de > writes:
[color=blue]
> In my not so humble opinion, instead of all this fancy stuff, you will be
> better off writing your stored procedures in PL/SQL, which is a very good
> language for manipulating data, and writing portable, efficient and
> maintainable server-side database code.[/color]
And if Python is the requirement, but not Oracle, one can write "stored
procedures" (functions is the name) in Python with PostgreSQL. ;-)
Thanks for your answers.
I would like to document with Python PL/SQL of programs, so similarly
as javadoc for Java.
I do not know whether it is possible. If yes, I would like to know how.
vb_bv wrote:[color=blue]
> Thanks for your answers.
> I would like to document with Python PL/SQL of programs, so similarly
> as javadoc for Java.
> I do not know whether it is possible. If yes, I would like to know how.[/color]
Is it possible - yes. Has it been done? I doubt it. You can fetch the
sourcecode of oracle packages through sql-statements (google for how to
do it), and then process it with whatever tool you like. But you will
have to write your own parser and generator for that, pydoc or epydoc
won't be of much use here. However, implementing such a thingy in
python is certainly a good idea.
> Thanks for your answers.[color=blue]
> I would like to document with Python PL/SQL of programs, so similarly
> as javadoc for Java.
> I do not know whether it is possible. If yes, I would like to know how.[/color]
All of the source code for procedures and packages in an oracle
database can be retreived from the USER_SOURCE view. It's just plain
text, though, and one record per line. Parsing it for documentation
would be up to you.
There are other views that might be useful too, like USER_TABLES,
USER_TAB_COLUMN S, USER_OBJECTS, USER_PROCEDURES , USER_ARGUMENTS, etc
etc etc
Comment