| От | Tom Lane |
|---|---|
| Тема | Re: Run external command as part of an sql statement ? |
| Дата | |
| Msg-id | 11260.1525729942@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Run external command as part of an sql statement ? ("David G. Johnston" <david.g.johnston@gmail.com>) |
| Список | pgsql-general |
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, May 7, 2018 at 2:35 PM, David Gauthier <davegauthierpg@gmail.com>
> wrote:
>> 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.
Depending on what you want to do, COPY TO/FROM PROGRAM might be a
serviceable option. But, just like the untrusted-PL variants, you
need to be superuser. Keep in mind that the program will run as
the database server owner (which is the reason for the superuser
restriction).
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера