Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux