Re: Rules versus triggers

From: stan <stanb(at)panix(dot)com>
To: Justin <zzzzz(dot)graf(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Rules versus triggers
Date: 2020-03-07 14:57:18
Message-ID: 20200307145718.GB10796@panix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Justin 2020-03-07 15:01:03 Re: Rules versus triggers
Previous Message stan 2020-03-07 14:55:11 RAISE ERROR