From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Wheeler <david(at)kineticode(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Neil Conway <neilc(at)samurai(dot)com>, Jan Wieck <JanWieck(at)yahoo(dot)com> |
Subject: | Re: DO INSTEAD and conditional rules |
Date: | 2005-04-26 15:55:58 |
Message-ID: | 2542.1114530958@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Wheeler <david(at)kineticode(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David Wheeler | 2005-04-26 16:17:32 | Re: DO INSTEAD and conditional rules |
Previous Message | Tom Lane | 2005-04-26 15:51:38 | Re: [HACKERS] Continue transactions after errors in psql |