Re: How to execute external script from a TRIGGER or FUNCTION ?

Поиск
Список
Период
Сортировка
От Chris Spotts
Тема Re: How to execute external script from a TRIGGER or FUNCTION ?
Дата
Msg-id 4A74EC63.9050005@gmail.com
обсуждение исходный текст
Ответ на Re: How to execute external script from a TRIGGER or FUNCTION ?  (Denis BUCHER <dbucherml@hsolutions.ch>)
Список pgsql-general
> After hours of search, I searched just some more and I think I found the
> solution, hope it can be useful to someone else :
>
> CREATE LANGUAGE plperlu;
>
> CREATE FUNCTION test_perl_external (integer) RETURNS boolean AS $$
>    $filename = '/tmp/somefile';
>     if (-e $filename) { return true; }
>     return false;
> $$ LANGUAGE plperlu;
>
> SELECT test_perl_external(1);
>

Just remember that anything run like that, won't rollback in a transaction.

В списке pgsql-general по дате отправления:

Предыдущее
От: Jun Yang
Дата:
Сообщение: Can I add a super table to existing tables?
Следующее
От: Andy Colson
Дата:
Сообщение: Re: questions on (parallel) COPY and when to REINDEX