Re: Asynchronos notifications to clients on table changes
От | Jason Earl |
---|---|
Тема | Re: Asynchronos notifications to clients on table changes |
Дата | |
Msg-id | 87d71r9bpz.fsf@npa01zz001.simplot.com обсуждение исходный текст |
Ответ на | Asynchronos notifications to clients on table changes (Vincent AE Scott <pgsql-novice@codex.net>) |
Список | 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 по дате отправления: