Skip site navigation (1) Skip section navigation (2)

Re: Runnning operating system commands from an SPL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Runnning operating system commands from an SPL
Date: 2010-06-17 15:15:32
Message-ID: 4130.1276787732@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Andreas Kretschmer <akretschmer(at)spamfence(dot)net> writes:
> Atif Jung <atifjung(at)gmail(dot)com> wrote:
>> How do I run an operating system command from a stored procedure? In INFORMIX I
>> would use the SYSTEM command, can't see to find the equivalent for POSTGRES.

> You can use a un-trusted programming language, for instance pl/perlu or
> plsh.

Keep in mind that more often than not the answer is "you shouldn't do
that".  Commands run in that way will execute as the postgres user,
not as your client user.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Atif JungDate: 2010-06-17 15:19:20
Subject: Re: Runnning operating system commands from an SPL
Previous:From: A BDate: 2010-06-17 15:14:24
Subject: How to combine many rows into one row (by concatenation?) ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group