From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joel Dudley <Joel(dot)Dudley(at)DevelopOnline(dot)com> |
Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: C functions, arguments, and ssh oh my! |
Date: | 2001-03-27 19:51:40 |
Message-ID: | 14952.985722700@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Joel Dudley <Joel(dot)Dudley(at)DevelopOnline(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-03-27 19:55:48 | Re: C functions, arguments, and ssh oh my! |
Previous Message | Martin A. Marques | 2001-03-27 19:44:27 | tables, where |