Thread: running external programs

running external programs

From
km
Date:
Hi all,

Is it possible in a PLSQL function to call an external program/script residing at /usr/bin  and return the result ?

are there any workarounds for this sort of a problem ?

regards,
KM

Re: running external programs

From
Andreas Kretschmer
Date:
km <km@mrna.tn.nic.in> schrieb:

>
> Hi all,
>
> Is it possible in a PLSQL function to call an external program/script residing at /usr/bin  and return the result ?

No, because plsql is a trusted language.
You can't run external commands from such a language.


>
> are there any workarounds for this sort of a problem ?

Yes, with untrusted languages like plperlU or plsh or other.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

Re: running external programs

From
Bill Moran
Date:
In response to Andreas Kretschmer <akretschmer@spamfence.net>:

> > are there any workarounds for this sort of a problem ?
>
> Yes, with untrusted languages like plperlU or plsh or other.

You can also write your own stored procedures that duplicate the
functionality of the external program ... assuming you have that
kind of access to the source code of the external program.

--
Bill Moran
Collaborative Fusion Inc.



IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader
ofthis message is not an intended recipient (or the individual responsible for the delivery of this message to an
intendedrecipient), please be advised that any re-use, dissemination, distribution or copying of this message is
prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this
e-mailfrom your system. 



Re: running external programs

From
Tony Caduto
Date:
km wrote:
> Hi all,
>
> Is it possible in a PLSQL function to call an external program/script residing at /usr/bin  and return the result ?
>
> are there any workarounds for this sort of a problem ?
>
> regards,
> KM
>
>
>
You can do it with a PLperl function.
You would have to use the untrusted PLperlu though.

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration


Re: running external programs

From
km
Date:
> > Is it possible in a PLSQL function to call an external program/script residing at /usr/bin  and return the result ?
>
> No, because plsql is a trusted language.
> You can't run external commands from such a language.

Is that a deciding criteria for a language to be flagged trusted or not ?

KM

Re: running external programs

From
"Uwe C. Schroeder"
Date:
On Tuesday 07 November 2006 10:55, km wrote:
> > > Is it possible in a PLSQL function to call an external program/script
> > > residing at /usr/bin  and return the result ?
> >
> > No, because plsql is a trusted language.
> > You can't run external commands from such a language.
>
> Is that a deciding criteria for a language to be flagged trusted or not ?

besides other reasons, yes.

UC

--
Open Source Solutions 4U, LLC    1618 Kelly St
Phone:  +1 707 568 3056        Santa Rosa, CA 95401
Cell:   +1 650 302 2405        United States
Fax:    +1 707 568 6416