Re: Run external command as part of an sql statement ? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Run external command as part of an sql statement ?
Date
Msg-id CAKFQuwYWhVm6bzCtXL5wuiFO1wj_9QA-JURNHyv2ZdEJTY2nBg@mail.gmail.com
Whole thread Raw
In response to Run external command as part of an sql statement ?  (David Gauthier <davegauthierpg@gmail.com>)
Responses Re: Run external command as part of an sql statement ?
List pgsql-general
On Mon, May 7, 2018 at 2:35 PM, David Gauthier <davegauthierpg@gmail.com> wrote:
Hi:

At the psql prompt, I can do something like...
   "select  \! id -nu"
...to get the uid of whoever's running psql.  
 
I want to be able to run a shell command like this from within a stored procedure.  Is there a way to do this ?


​In core, you can probably use the untrusted​ version of Perl, Python, or Tcl to accomplish your goal.  SQL and pl/pgSQL do not provide that capability.​

​David J.


pgsql-general by date:

Previous
From: David Gauthier
Date:
Subject: Run external command as part of an sql statement ?
Next
From: Tom Lane
Date:
Subject: Re: Run external command as part of an sql statement ?