Re: C functions, arguments, and ssh oh my!
| От | Tom Lane |
|---|---|
| Тема | Re: C functions, arguments, and ssh oh my! |
| Дата | |
| Msg-id | 14952.985722700@sss.pgh.pa.us обсуждение |
| Ответ на | C functions, arguments, and ssh oh my! (Joel Dudley <Joel.Dudley@DevelopOnline.com>) |
| Список | pgsql-general |
Joel Dudley <Joel.Dudley@DevelopOnline.com> writes:
> what it does with those is builds a command string for an external app that
> is called with system() and exits 0. I know this is strange and ugly but I
> need to trigger this external app when an insert is made into a user table.
This seems an extremely dubious practice. If the transaction doing the
insert is later rolled back, the insert effectively never happened ---
but the effects of your external app will still be there. I'd suggest
thinking twice about your whole system design, if it requires this.
You can mitigate the problem a little bit by making the trigger an
AFTER trigger, so that it's only fired when we are about to commit the
transaction. But there's still a possibility of trouble if a later
AFTER trigger decides to abort.
regards, tom lane
В списке pgsql-general по дате отправления: