From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Peter Geoghegan <peter(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Deprecating RULES |
Date: | 2012-10-15 07:00:57 |
Message-ID: | CA+U5nM+8M_4_SOmqDEj4cCHWPGj8Xs=203JBnUDqjqaSVc6pkw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 15 October 2012 00:30, Greg Stark <stark(at)mit(dot)edu> wrote:
> On Sun, Oct 14, 2012 at 9:30 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> On 12 October 2012 19:48, Greg Stark <stark(at)mit(dot)edu> wrote:
>>> On Fri, Oct 12, 2012 at 7:55 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>>>> AFAICS all RULEs can be re-expressed as Triggers or Views.
>>>
>>> This is a bizarre discussion. Firstly this isn't even close to true.
>>> The whole source of people's discontentment is that triggers are *not*
>>> equivalent to rules. If they were then they wouldn't be so upset.
>>
>> This may be a confusion on the point of equivalence; clearly the
>> features work differently.
>>
>> I'm not aware of any rule that can't be rewritten as a trigger or a
>> view. Please can anyone show me some examples of those?
>
> Huh? The one thing we currently use rules for, implementing views,
> couldn't be done in triggers.
Yes, obviously....
> In general if your source table is empty
> then there's *nothing* you could cause to happen with triggers because
> no triggers will fire.
Before statement triggers will fire.
Please can anyone show me the SQL for a rule that cannot be written as
a view or a trigger? I do not believe such a thing exists and I will
provide free beer to the first person that can prove me wrong.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Boszormenyi Zoltan | 2012-10-15 07:46:19 | Re: [PATCH] Make pg_basebackup configure and start standby [Review] |
Previous Message | Pavel Stehule | 2012-10-15 03:57:42 | Re: proposal - assign result of query to psql variable |