Re: execute system command from storage procedure

Lists: pgsql-sql
From: "Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro>
To: pgsql-sql(at)postgresql(dot)org
Subject: execute system command from storage procedure
Date: 2007-12-06 16:32:01
Message-ID: fj985l$1h70$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Hi there,

Is it possible to execute a system command from a function ? (e.g. bash )

TIA,
Sabin


From: Erik Jones <erik(at)myemma(dot)com>
To: Sabin Coanda <sabin(dot)coanda(at)deuromedia(dot)ro>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: execute system command from storage procedure
Date: 2007-12-06 17:05:26
Message-ID: 0ADCABEF-24DC-4C72-9ED4-EBB7D2AA54FC@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql


On Dec 6, 2007, at 10:32 AM, Sabin Coanda wrote:

> Hi there,
>
> Is it possible to execute a system command from a function ? (e.g.
> bash )

If you use one of the untrusted procedural languages (e.g. plperlu,
plpythonu, ...) you can.

Erik Jones

Software Developer | Emma®
erik(at)myemma(dot)com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com


From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: execute system command from storage procedure
Date: 2007-12-06 17:07:56
Message-ID: 20071206170755.GA16649@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Sabin Coanda <sabin(dot)coanda(at)deuromedia(dot)ro> schrieb:

> Hi there,
>
> Is it possible to execute a system command from a function ? (e.g. bash )

Yes, of course, but you need an untrusted language like pl/perlU oder
plsh. http://plsh.projects.postgresql.org/

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°