Re: BUG #1676: Statment order in rules

From: Olleg Samoylov <olleg(at)mipt(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1676: Statment order in rules
Date: 2005-05-20 09:07:32
Message-ID: 428DA8D4.8020809@mipt.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> This isn't a bug. The DELETE causes the a=0 row to disappear from the

I undestand.

When I got choice between rules and triggers, I looked carefully is
documantation, section "33.6. Rules versus Triggers". As I can see,
rules prefered, there are many examples, why rules better then triggers.
Only described advantage of triggers is using triggers as constraints.

But later I got bugs and submit #1447, #1610, #1676. All resolved as
"not a bug". IMHO this is due to lack of documentation, don't described
explicitly what disadvatages or unexpected "features" rules have. Well
#1676 looked strange, but can de derived from "33.3. Rules on INSERT,
UPDATE, and DELETE". As I can undestand, if rule fire several commands,
command to change table of rule must be last. This is not explicitly
documented. ALSO rules didn't designed so. Why?

As I begin undestand now, bug #1447 is consequence from "feature" #1676,
isn't it? And can be avoided by changing ALSO rule to INSTEAD rule with
command to modify table, implicitly existed in ALSO rule, in the last.
This workaround must be documented. Or may be better change ALSO rule
behaviour?

#1610 disconform documentation. Documentation or rules must be fixed.
Fix rules prefered.

As I undestand from bug resolution, this "features" don't planed to be
fixed. I add comments to documentation about this "features", but this
is all, what I can. As I can undestand now, my comment in documentation
for "feature" #1447 in section "33.6. Rules versus Triggers" is
incorrect, but I can't remove it.

--
Olleg Samoylov

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-05-20 15:40:05 Re: CHECK constraint (true) causes dumps with parse errors
Previous Message Neil Conway 2005-05-20 08:22:21 Re: CHECK constraint (true) causes dumps with parse errors