Re: Asynchronos notifications to clients on table changes - Mailing list pgsql-novice

From Jason Earl
Subject Re: Asynchronos notifications to clients on table changes
Date
Msg-id 87d71r9bpz.fsf@npa01zz001.simplot.com
Whole thread Raw
In response to Asynchronos notifications to clients on table changes  (Vincent AE Scott <pgsql-novice@codex.net>)
List 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@codex.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@postgresql.org

pgsql-novice by date:

Previous
From: "Oliver Walter"
Date:
Subject: pg_ctl stop
Next
From: Jason Earl
Date:
Subject: Re: Number of days in a month