Re: Run external command as part of an sql statement ?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Run external command as part of an sql statement ?
Дата
Msg-id CAKFQuwYWhVm6bzCtXL5wuiFO1wj_9QA-JURNHyv2ZdEJTY2nBg@mail.gmail.com
обсуждение исходный текст
Ответ на Run external command as part of an sql statement ?  (David Gauthier <davegauthierpg@gmail.com>)
Ответы Re: Run external command as part of an sql statement ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: David Gauthier
Дата:
Сообщение: Run external command as part of an sql statement ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Run external command as part of an sql statement ?