Re: Watching for view changes

From: Mitar <mmitar(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Watching for view changes
Date: 2018-12-20 20:20:00
Message-ID: CAKLmikMm6V2e4-Ltpt7Qt0KSjhPXEWQSV6844qSqeTQKKBHr+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

On Thu, Dec 20, 2018 at 12:07 PM Rob Sargent <robjsargent(at)gmail(dot)com> wrote:
> Are you hoping to see the difference in the returned values for successive calls to the same query?

i would like to in as close to real-time as possible get notification
when results of a query would have changed if I would do the same
query again, without me having to do polling or without me having to
do diffing.

So if my query was SELECT * FROM table then having after update
trigger on that table would give me such information on a row to row
basis, or statement basis. But I am not doing just such queries. So I
was thinking that I could create a view and then do SELECT * FROM view
to get update trigger on changes on the view. So changes would happen
because of changes do underlying tables. And I would like to be able
to know when and what in that query has changed when underlying tables
have changed.

I have found this package [1] which seems to be close in the idea, but
it does not seem to work in all cases. There is also an older
different package. [2] I would like to see if something like this
could be done inside database itself.

[1] https://github.com/nothingisdead/pg-live-query
[2] https://github.com/numtel/pg-live-select

Mitar

--
http://mitar.tnode.com/
https://twitter.com/mitar_m

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2018-12-20 20:25:14 Re: Multiple LDAP Servers for ldap Authentication
Previous Message Mitar 2018-12-20 20:12:14 Re: Watching for view changes