Re: Can PostgreSQL notify a client that a trigger has

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Bill <postgresql(at)dbginc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can PostgreSQL notify a client that a trigger has
Date: 2006-11-09 00:43:59
Message-ID: 1163033039.31124.481.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2006-11-09 at 00:39 +0000, Bill wrote:
> Does PostgreSQL have built in mechanism I can use to conditionally
> notify a client application that a trigger has fired? What I want is
> something along the line of the following pseudo code in a trigger.
>
> if <condition> then
> raise client event
>

Yes, use LISTEN and NOTIFY. Probably it's easiest to write the trigger
in PL/pgSQL.

Regards,
Jeff Davis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2006-11-09 00:48:00 Re: Can PostgreSQL notify a client that a trigger has fired?
Previous Message Bill 2006-11-09 00:39:06 Can PostgreSQL notify a client that a trigger has fired?