Re: DO INSTEAD and conditional rules - Mailing list pgsql-hackers

From Tom Lane
Subject Re: DO INSTEAD and conditional rules
Date
Msg-id 2542.1114530958@sss.pgh.pa.us
Whole thread Raw
In response to DO INSTEAD and conditional rules  (Neil Conway <neilc@samurai.com>)
Responses Re: DO INSTEAD and conditional rules  (David Wheeler <david@kineticode.com>)
List pgsql-hackers
David Wheeler <david@kineticode.com> writes:
> On Apr 25, 2005, at 11:37 PM, Tom Lane wrote:
>> (I have been thinking more and more that we should consider a wholesale
>> redesign of the rule mechanism, because it sure seems not to answer the
>> needs/expectations of a lot of people out there.

> I think that people are likely to confuse rules and triggers. The other 
> issue is that they are not documented in such a way as to make them 
> simple to understand. But beyond that, although I like Neil's 
> suggestion better, rules work pretty well for what I need them for--the 
> ability to INSERT, UPDATE, or DELETE on a view.

Well, they handle simple situations OK, but we keep seeing people get
burnt as soon as they venture into interesting territory.  For instance,
if the view is a join, you can't easily make a rule that turns a delete
into deletions of both joined rows.  And you'll get burnt if you try to
insert any volatile functions, because of the multiple-evaluation issue.
Etc.

Like I said, I don't have a better idea.  Just a vague feeling of
dissatisfaction.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Continue transactions after errors in psql
Next
From: David Wheeler
Date:
Subject: Re: DO INSTEAD and conditional rules