pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: stan <stanb@panix.com>
To: Justin <zzzzz.graf@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Rules versus triggers
Date: Sat, 7 Mar 2020 09:57:18 -0500
Message-ID: <20200307145718.GB10796@panix.com> (raw)
In-Reply-To: <CALL-XeORpZyTBLSjn-vw5Xhs_cKdv-P-WB420xbWiGwC57MA3A@mail.gmail.com>
References: <20200307115615.GA27155@panix.com>
	<CALL-XeORpZyTBLSjn-vw5Xhs_cKdv-P-WB420xbWiGwC57MA3A@mail.gmail.com>

On Sat, Mar 07, 2020 at 09:47:39AM -0500, Justin wrote:
> Hi Stan
> 
> Rules actual are able to rewrite the SQL query sent to  postgresql.  Most
> everyone suggestion is avoid rules.
> 
> Triggers are just like every other databases Triggers firing off code for
> Insert/Update/Delete/Truncate event
> https://www.postgresql.org/docs/current/sql-createtrigger.html
> 

So, the RULE can actually rewrite the query, instead of replacing it,
which is what I m doing in the function, correct?
-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
						-- Benjamin Franklin





view thread (6+ messages)  latest in thread

Message-ID: <20200307145718.GB10796@panix.com>
Permalink:  ../20200307145718.GB10796@panix.com/
Also on:    postgresql.org/message-id/20200307145718.GB10796@panix.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: stanb@panix.com, zzzzz.graf@gmail.com
  Subject: Re: Rules versus triggers
  In-Reply-To: <20200307145718.GB10796@panix.com>
  References: <20200307115615.GA27155@panix.com> <CALL-XeORpZyTBLSjn-vw5Xhs_cKdv-P-WB420xbWiGwC57MA3A@mail.gmail.com> <20200307145718.GB10796@panix.com>

* 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