NOTIFY man page still recommends rules
NOTIFY man page still recommends rules
От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
The NOTIFY man page writes When NOTIFY is used to signal the occurrence of changes to a particular table, a useful programming technique is to put the NOTIFY 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. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: NOTIFY man page still recommends rules
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Peter Eisentraut wrote: > The NOTIFY man page writes > > When NOTIFY is used to signal the occurrence of > changes > to a particular table, a useful programming technique is to put the > NOTIFY 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
Re: NOTIFY man page still recommends rules
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alvaro Herrera writes: > Peter Eisentraut wrote: >> Is using rules here still best practice? This was probably written >> before statement triggers were available. > 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. +1 regards, tom lane
Re: NOTIFY man page still recommends rules
От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
On 8/2/16 1:31 PM, Alvaro Herrera wrote: > 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. done -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services