Re: Asynchronos notifications to clients on table changes

From: Jason Earl <jason(dot)earl(at)simplot(dot)com>
To: Vincent AE Scott <pgsql-novice(at)codex(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Asynchronos notifications to clients on table changes
Date: 2001-12-07 17:33:28
Message-ID: 87d71r9bpz.fsf@npa01zz001.simplot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Check out the NOTIFY and LISTEN commands. I usually create a small
function that fires off a notify on INSERT DELETE or UPDATE and then I
simply have my application LISTEN for these notifies.

No external program necessary.

Jason

Vincent AE Scott <pgsql-novice(at)codex(dot)net> writes:

> What would be a reliable way for a client accessing postgres to be
> informed asynchronosly of inserts/updates/deletes to a table? I'm
> thinking of something that has fairly fine grained control over what it
> gets notified of. Something like a client registering (somewhere) a
> select statement, and when a matching row changes to be informed about
> it.
>
> I guess this would require some external program, and possibly
> programmed trigger modules in the database?
>
> Is this even theoretically possible? Or would the overhead under heavy
> loads completely kill the database?
>
>
> --
>
> PGP key: http://codex.net/pgp/pgp.asc
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2001-12-07 18:36:45 Re: pg_ctl stop
Previous Message Jason Earl 2001-12-07 17:29:48 Re: Number of days in a month