Re: Building a notification system. - Mailing list pgsql-general

From Anto Aravinth
Subject Re: Building a notification system.
Date
Msg-id CANtp6R+t9U79bh0-1MTwMpy0V4jhxEuMNNikvBvRAvpYsRuuew@mail.gmail.com
Whole thread Raw
In response to Re: Building a notification system.  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
So just maintaining a notification table along with user id would do I believe. Just notifies the user if he/she has the userid in notification table and its not in read state. 

On Sun, Jul 15, 2018 at 10:23 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Sunday, July 15, 2018, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Sunday, July 15, 2018, Anto Aravinth <anto.aravinth.cse@gmail.com> wrote:

I'm not sure, how to get started with this. Read about NOTIFY: https://www.postgresql.org/docs/current/static/sql-notify.html


Not sure that fits my use case, thanks for your help in this.


It doesn't.  You need to record time stamps for the relevant events and use them to decide what is new and what is old.

Or, to avoid time skew issues, an equivalent protocol using serial (big)integers (see create sequence)

David J.
 

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Building a notification system.
Next
From: Dmitry Igrishin
Date:
Subject: Do we need yet another IDE (SQL development assistant) for PostgreSQL?