pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: NOTIFY man page still recommends rules
Date: Tue, 2 Aug 2016 13:31:17 -0400
Message-ID: <20160802173117.GA554886@alvherre.pgsql> (raw)
In-Reply-To: <913aa238-04c7-a75f-28e6-8845119eb3df@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (4+ messages)  latest in thread

Message-ID: <20160802173117.GA554886@alvherre.pgsql>
Permalink:  ../20160802173117.GA554886@alvherre.pgsql/
Also on:    postgresql.org/message-id/20160802173117.GA554886@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: alvherre@2ndquadrant.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: NOTIFY man page still recommends rules
  In-Reply-To: <20160802173117.GA554886@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox