Re: making a trigger to a system call to a shell script

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Alejandro Fernandez <ale(at)e-group(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: making a trigger to a system call to a shell script
Date: 2002-05-03 16:09:15
Message-ID: 20020503090510.K67939-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> Anyway, last step was to create a trigger so that I could monitor changes to my table remotely:
>
> create trigger trigger_alertme before insert or update on mytable for
> each row execute procedure alertme('blablabla');
>
> And this will not work: it returns:
>
> ERROR: CreateTrigger: function alertme() does not exist

That's because trigger functions take no arguments and
return opaque. Trigger arguments are passed specially
and not through normal arguments. You need to write the
function to meet the trigger requirements (there's more information
in the documentation on trigger functions it looks like)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Siebert 2002-05-03 16:33:11 Foxpro
Previous Message Scott Marlowe 2002-05-03 15:46:56 Re: Subject: bool / vacuum full bug followup