Re: NOTIFY man page still recommends rules - Mailing list pgsql-docs

From Alvaro Herrera
Subject Re: NOTIFY man page still recommends rules
Date
Msg-id 20160802173117.GA554886@alvherre.pgsql
Whole thread Raw
In response to NOTIFY man page still recommends rules  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: NOTIFY man page still recommends rules  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: NOTIFY man page still recommends rules  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-docs
Peter Eisentraut wrote:
> The NOTIFY man page writes
>
>    When <command>NOTIFY</command> is used to signal the occurrence of
> changes
>    to a particular table, a useful programming technique is to put the
>    <command>NOTIFY</command> in a rule that is triggered by table updates.
>
> Is using rules here still best practice?  This was probably written
> before statement triggers were available.
>
> Even if yes, we might want to explain why, since we generally discourage
> rule use otherwise.

I think it's easier to dodge the rules topic entirely here and just
mention statement triggers.  Using rules you cannot cover the truncate
case, for instance.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-docs by date:

Previous
From: Peter Eisentraut
Date:
Subject: NOTIFY man page still recommends rules
Next
From: Tom Lane
Date:
Subject: Re: NOTIFY man page still recommends rules