Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #14918 > unrolled thread

Python as a replacement to PL/SQL

Started byAlec Taylor <alec.taylor6@gmail.com>
First post2011-10-25 00:39 +1100
Last post2011-10-24 18:37 +0200
Articles 5 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  Python as a replacement to PL/SQL Alec Taylor <alec.taylor6@gmail.com> - 2011-10-25 00:39 +1100
    Re: Python as a replacement to PL/SQL Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2011-10-24 16:45 +0200
      Re: Python as a replacement to PL/SQL Alec Taylor <alec.taylor6@gmail.com> - 2011-10-25 01:59 +1100
        Re: Python as a replacement to PL/SQL Ben Finney <ben+python@benfinney.id.au> - 2011-10-25 08:36 +1100
      Re: Python as a replacement to PL/SQL Martin Komoň <M.Komon@SiliconHill.cz> - 2011-10-24 18:37 +0200

#14918 — Python as a replacement to PL/SQL

FromAlec Taylor <alec.taylor6@gmail.com>
Date2011-10-25 00:39 +1100
SubjectPython as a replacement to PL/SQL
Message-ID<mailman.2176.1319463553.27778.python-list@python.org>
Good morning,

Is there a set of libraries for python which can be used as a complete
replacement to PL/SQL?

Alternatively, is there a python library for generating PL/SQL?

(I am speaking from the context of Oracle DB, PL/Python only works
with PostgreSQL)

Thanks for all suggestions,

Alec Taylor

[toc] | [next] | [standalone]


#14923

FromAlain Ketterlin <alain@dpt-info.u-strasbg.fr>
Date2011-10-24 16:45 +0200
Message-ID<87bot6sb2j.fsf@dpt-info.u-strasbg.fr>
In reply to#14918
Alec Taylor <alec.taylor6@gmail.com> writes:

> Is there a set of libraries for python which can be used as a complete
> replacement to PL/SQL?

This doesn't make much sense: PL/SQL lets you write server-side code,
i.e., executed by the DBMS. Oracle can't execute python code directly,
so python can only be used on the client side (I meant "client of the
DBMS"), i.e., not to write stored procedures. There is no "complete
replacement" of PL/SQL besides Java.

This page shows you how to _call_ PL/SQL procedures from a python script:

http://www.oracle.com/technetwork/articles/dsl/python-091105.html

> (I am speaking from the context of Oracle DB, PL/Python only works
> with PostgreSQL)

PL/Python is a different beast, it lets you write stored functions in
python. There is no such thing, afaik, with Oracle.

-- Alain.

[toc] | [prev] | [next] | [standalone]


#14924

FromAlec Taylor <alec.taylor6@gmail.com>
Date2011-10-25 01:59 +1100
Message-ID<mailman.2180.1319468349.27778.python-list@python.org>
In reply to#14923
Hmm...

What else is there besides PL/Python (for any DB) in the context of
writing stored procedures in function?

Thanks for all suggestions,

Alec Taylor

On Tue, Oct 25, 2011 at 1:45 AM, Alain Ketterlin
<alain@dpt-info.u-strasbg.fr> wrote:
> Alec Taylor <alec.taylor6@gmail.com> writes:
>
>> Is there a set of libraries for python which can be used as a complete
>> replacement to PL/SQL?
>
> This doesn't make much sense: PL/SQL lets you write server-side code,
> i.e., executed by the DBMS. Oracle can't execute python code directly,
> so python can only be used on the client side (I meant "client of the
> DBMS"), i.e., not to write stored procedures. There is no "complete
> replacement" of PL/SQL besides Java.
>
> This page shows you how to _call_ PL/SQL procedures from a python script:
>
> http://www.oracle.com/technetwork/articles/dsl/python-091105.html
>
>> (I am speaking from the context of Oracle DB, PL/Python only works
>> with PostgreSQL)
>
> PL/Python is a different beast, it lets you write stored functions in
> python. There is no such thing, afaik, with Oracle.
>
> -- Alain.
> --
> http://mail.python.org/mailman/listinfo/python-list
>

[toc] | [prev] | [next] | [standalone]


#14939

FromBen Finney <ben+python@benfinney.id.au>
Date2011-10-25 08:36 +1100
Message-ID<87sjmijclt.fsf@benfinney.id.au>
In reply to#14924
Alec Taylor <alec.taylor6@gmail.com> writes:

> What else is there besides PL/Python (for any DB) in the context of
> writing stored procedures in function?

I know of no server-side language other than SQL which can reasonably be
expected to work “for any DB”.

PostgreSQL supports PL/pgSQL, PL/Python, PL/tcl, PL/Perl, and others
<URL:http://www.postgresql.org/docs/current/static/xplang.html>.

-- 
 \       Moriarty: “Forty thousand million billion dollars? That money |
  `\            must be worth a fortune!” —The Goon Show, _The Sale of |
_o__)                                                       Manhattan_ |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#14927

FromMartin Komoň <M.Komon@SiliconHill.cz>
Date2011-10-24 18:37 +0200
Message-ID<mailman.2184.1319474262.27778.python-list@python.org>
In reply to#14923
PostgreSQL supports PL/SQL, PL/TCL, PL/Python, PL/Perl and I've also
seen PL/Java add on module.

Martin

On 10/24/2011 4:59 PM, Alec Taylor wrote:
> Hmm...
> 
> What else is there besides PL/Python (for any DB) in the context of
> writing stored procedures in function?
> 
> Thanks for all suggestions,
> 
> Alec Taylor
> 
> On Tue, Oct 25, 2011 at 1:45 AM, Alain Ketterlin
> <alain@dpt-info.u-strasbg.fr> wrote:
>> Alec Taylor <alec.taylor6@gmail.com> writes:
>>
>>> Is there a set of libraries for python which can be used as a complete
>>> replacement to PL/SQL?
>>
>> This doesn't make much sense: PL/SQL lets you write server-side code,
>> i.e., executed by the DBMS. Oracle can't execute python code directly,
>> so python can only be used on the client side (I meant "client of the
>> DBMS"), i.e., not to write stored procedures. There is no "complete
>> replacement" of PL/SQL besides Java.
>>
>> This page shows you how to _call_ PL/SQL procedures from a python script:
>>
>> http://www.oracle.com/technetwork/articles/dsl/python-091105.html
>>
>>> (I am speaking from the context of Oracle DB, PL/Python only works
>>> with PostgreSQL)
>>
>> PL/Python is a different beast, it lets you write stored functions in
>> python. There is no such thing, afaik, with Oracle.
>>
>> -- Alain.
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web