Обсуждение: call an external script from pgsql

Поиск
Список
Период
Сортировка

call an external script from pgsql

От
Olivier Boissard
Дата:
I would like to call an external "shell" script from a trigger.
I use actually pgplsh. It works fine but there is a lot of problem with
special characters.
In addition I can not compile this language any more..

Do you know others solutions to call an external script?
Is it possible with python ?

Olivier


Вложения

Re: call an external script from pgsql

От
Peter Eisentraut
Дата:
Am Donnerstag, 2. März 2006 16:53 schrieb Olivier Boissard:
> I would like to call an external "shell" script from a trigger.
> I use actually pgplsh. It works fine but there is a lot of problem with
> special characters.

Details please.

> In addition I can not compile this language any more..

Details please.

> Do you know others solutions to call an external script?
> Is it possible with python ?

plperlu and plpythonu also work.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: call an external script from pgsql

От
Olivier Boissard
Дата:
Peter Eisentraut wrote:

>Am Donnerstag, 2. März 2006 16:53 schrieb Olivier Boissard:
>
>
>>I would like to call an external "shell" script from a trigger.
>>I use actually pgplsh. It works fine but there is a lot of problem with
>>special characters.
>>
>>
>
>Details please.
>
>
>
>>In addition I can not compile this language any more..
>>
>>
>
>Details please.
>
>
>
>>Do you know others solutions to call an external script?
>>Is it possible with python ?
>>
>>
>
>plperlu and plpythonu also work.
>
>
>
I created a trigger on a table that contains different log information.
This trigger launched a plsh function that execute a shell script to
print le new record a the table (with CUPS)
It worked fine but when I upgrated postgresql 7.4 -> 8.1 I was unable to
recompile properly pgplsh. So I  copied old libraries and sql files from
a backup.
It works .
When I make a dump (pg_dump and psql ) the restoration fails because of
specific characters used in pgplsh. And I realized that there is poor
documentation on the web.
That is the reason why I consider now to change this system.

Olivier

Вложения