pl/pgsql question

Started by Rhys A.D. Stewartalmost 20 years ago5 messagesgeneral
Jump to latest
#1Rhys A.D. Stewart
rhys.stewart@gmail.com

hi all,
are there any function in pl/pgsql to call a shell script? or like is
there a pl/bash?

Rhys

Peace & Love | Live Long & Prosper

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Rhys A.D. Stewart (#1)
Re: pl/pgsql question

Two options I have run across.
pl/sh
http://developer.postgresql.org/~petere/pgplsh/
ShellSQL
http://www.edlsystems.com/shellsql/
On Friday 12 May 2006 07:54 am, Rhys Stewart wrote:

hi all,
are there any function in pl/pgsql to call a shell script? or like is
there a pl/bash?

Rhys

Peace & Love | Live Long & Prosper

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

--
Adrian Klaver
aklaver@comcast.net

#3Terry Lee Tucker
terry@esc1.com
In reply to: Rhys A.D. Stewart (#1)
Re: pl/pgsql question

On Friday 12 May 2006 10:54 am, "Rhys Stewart" <rhys.stewart@gmail.com> thus
communicated:
--> hi all,
--> are there any function in pl/pgsql to call a shell script? or like is
--> there a pl/bash?
-->

You can use Perl in "untrusted" mode as a backend function and accomplish
something like that.

#4Michael Fuhr
mike@fuhr.org
In reply to: Rhys A.D. Stewart (#1)
Re: pl/pgsql question

On Fri, May 12, 2006 at 09:54:23AM -0500, Rhys Stewart wrote:

are there any function in pl/pgsql to call a shell script? or like is
there a pl/bash?

PL/sh might be what you're after; you could also use PL/Perl, etc.

http://pgfoundry.org/projects/plsh/

What does the shell script do? Having the database invoke external
actions isn't always a good idea; for example, if the transaction
rolls back then you can't undo those actions. Some problems are
better solved with LISTEN/NOTIFY because notifications don't go out
unless and until the transaction commits.

--
Michael Fuhr

#5Joshua D. Drake
jd@commandprompt.com
In reply to: Rhys A.D. Stewart (#1)
Re: pl/pgsql question

Rhys Stewart wrote:

hi all,
are there any function in pl/pgsql to call a shell script? or like is
there a pl/bash?

Actually scary enough, there is pl/bash. Google is your friend. You can
also use:

plpython, plperl, plphp, pljava etc...

Joshua D. Drake

Rhys

Peace & Love | Live Long & Prosper

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/