Re: Running Command Line From Trigger?
От
Terry Lee Tucker
Тема
Re: Running Command Line From Trigger?
Дата
Msg-id
200604061557.46990.terry@esc1.com
Ответ на
Running Command Line From Trigger? (Yudie Pg)
Список
Дерево обсуждения
Running Command Line From Trigger? "Yudie Pg" <yudiepg@gmail.com>
Re: Running Command Line From Trigger? Scott Marlowe <smarlowe@g2switchworks.com>
Re: Running Command Line From Trigger? Terry Lee Tucker <terry@esc1.com>
Re: Running Command Line From Trigger? "Yudie Pg" <yudiepg@gmail.com>
Re: Running Command Line From Trigger? Scott Marlowe <smarlowe@g2switchworks.com>
Re: Running Command Line From Trigger? Scott Marlowe <smarlowe@g2switchworks.com>
Re: Running Command Line From Trigger? Tony Caduto <tony_caduto@amsoftwaredesign.com>
Re: Running Command Line From Trigger? "Yudie Pg" <yudiepg@gmail.com>
Re: Running Command Line From Trigger? Terry Lee Tucker <terry@esc1.com>
Re: Running Command Line From Trigger? Scott Marlowe <smarlowe@g2switchworks.com>
Re: Running Command Line From Trigger? Terry Lee Tucker <terry@esc1.com>
Re: Running Command Line From Trigger? "Yudie Pg" <yudiepg@gmail.com>
Re: Running Command Line From Trigger? Terry Lee Tucker <terry@esc1.com>
On Thursday 06 April 2006 03:48 pm, Yudie Pg saith:
> I want to execute a command line from trigger function.
> The reason is I want to execute my perl script from stored procedure.
>
> any idea?
>
>
> Yudie
Yudie,
You might want to write your perl script as a trusted perl funcion and call
from your trigger as you would any other backend function.
Example of one we use:
CREATE OR REPLACE FUNCTION fmtstr (TEXT, INTEGER) RETURNS TEXT AS '
my ($str, $len) = @_;
return (pack ("A$len", $str));
' LANGUAGE 'plperlu';
В списке pgsql-general по дате отправления