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

From: Erik Jones <erik(at)myemma(dot)com>
To: Bima Djaloeis <bima(dot)djaloeis(dot)uni(at)googlemail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: ON INSERT => execute AWK/SH/EXE?
Date: 2007-09-18 16:33:44
Message-ID: 3CB6C4A5-0FAB-4E32-9491-1CF7806A81C4@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Sep 17, 2007, at 11: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.
>
> Thanks for reading, any help is appreciated.

You could use a trigger function in an untrusted procedural language
such as plperlu or plpythonu to do that.

Erik Jones

Software Developer | Emma®
erik(at)myemma(dot)com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2007-09-18 16:35:30 Optimizing "exists"
Previous Message A. Kretschmer 2007-09-18 16:33:34 Re: ON INSERT => execute AWK/SH/EXE?

Browse pgsql-novice by date

  From Date Subject
Next Message Steve Atkins 2007-09-18 16:43:39 Re: ON INSERT => execute AWK/SH/EXE?
Previous Message A. Kretschmer 2007-09-18 16:33:34 Re: ON INSERT => execute AWK/SH/EXE?