From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Deprecating RULES |
Date: | 2012-10-17 18:41:51 |
Message-ID: | CA+U5nMJ9r7BG63kL02o+YscwMF50ec3t84tgJ6KQDuAz=1LCFA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 17 October 2012 18:46, Greg Stark <stark(at)mit(dot)edu> wrote:
> I would suggest something like
>
> Warning: RULES are tricky to use correctly. They rewrite the original
> query into a new query before it is run and it is very hard to
> correctly anticipate and rewrite every possible input query into the
> desired result. There are also unexpected interactions with other
> components when RULES do something unexpected such as rewrite a single
> query to return two result sets.
>
> For most applications it's much simpler and more predictable to use
> TRIGGERs. ROW level triggers are evaluated for each row the original
> query is about to process (or has just finished processing) and this
> makes them much easier to follow. Statement level TRIGGERs can be used
> for audit logs and similar operations which need to run once per
> statement.
I like this very much. Thank you.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2012-10-17 18:48:45 | Re: [RFC] CREATE QUEUE (log-only table) for londiste/pgQ ccompatibility |
Previous Message | John R Pierce | 2012-10-17 18:34:40 | Re: Deprecating RULES |