Re: Best way to use trigger to email a report ? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Best way to use trigger to email a report ?
Date
Msg-id CAKFQuwY+nTQf+L7ff144_ATdVPEb0wsSKnnDoRe-aZVu6r15fg@mail.gmail.com
Whole thread Raw
In response to Re: Best way to use trigger to email a report ?  (Christophe Pettus <xof@thebuild.com>)
Responses Re: Best way to use trigger to email a report ?
Re: Best way to use trigger to email a report ?
List pgsql-general
On Fri, May 8, 2020 at 10:19 AM Christophe Pettus <xof@thebuild.com> wrote:
If you don't want to periodically poll the table, you can use NOTIFY within the trigger to wake up a process that is waiting on NOTIFY.

Kinda.  

"With the libpq library, the application issues LISTEN as an ordinary SQL command, and then must periodically call the function PQnotifies to find out whether any notification events have been received.".

IOW, the interface for the client is still a polling interface its just that with LISTEN the event is transient and in-memory only (on the server) and thus has less overhead.

David J.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Thoughts on how to avoid a massive integer update.
Next
From: David Gauthier
Date:
Subject: Re: Best way to use trigger to email a report ?