Re: ON INSERT => execute AWK/SH/EXE?

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Re: ON INSERT => execute AWK/SH/EXE?
Дата
Msg-id F36E22E2-FEAE-4733-9093-E88313BCC3A5@blighty.com
обсуждение исходный текст
Ответ на ON INSERT => execute AWK/SH/EXE?  ("Bima Djaloeis" <bima.djaloeis.uni@googlemail.com>)
Список pgsql-general
On Sep 17, 2007, at 9:50 AM, Bima Djaloeis wrote:

> Hi there,
>
> I am new to PostgreSQL, is it possible to create something so that
>
> 1) If I insert / update / delete an item from my DB...
> 2) ... an awk / shell / external program is executed in my UNIX
> System?
>
> If yes, how do I do this and if no, thanks for telling.
>

Yes it's possible, but it's probably a really bad idea, so I'm not
going to tell you how.

Instead, use a trigger to store a message in a queue table, then have
an external persistent process poll the queue table (or use listen/
notify to sleep until new messages to be added to the queue).

Cheers,
   Steve



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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Optimizing "exists"
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: tradeoffs for multi-schema or multi-db