Re: [GENERAL] INSTEAD rule bug? - Mailing list pgsql-bugs

From Dmitry Tkach
Subject Re: [GENERAL] INSTEAD rule bug?
Date
Msg-id 3F156425.70802@openratings.com
Whole thread Raw
In response to Re: [GENERAL] INSTEAD rule bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:

>Dmitry Tkach <dmitry@openratings.com> writes:
>
>
>>It would have saved a lot of trouble if it just complained about that
>>union thing right away and refuse to create the rule...
>>
>>
>
>That's what happens in CVS tip.
>
>
I thought you said it was only complaining about references to new and
old, not about *any* union clause...
Did I get it wrong?

>
>
>>On a different note, I think there *is* a way to add a where clause to
>>the union - that's exactly what I did in that last example - by
>>converting it into a subselect...
>>Can that not be done automatically for conditional rules?
>>
>>
>
>Send a patch... or at least convince us it can be done ... I'm not
>convinced yet.
>
>
>
I am afraid, that's too complicated for me :-)
I tried to dig through the source a little bit when I was struggling to
figure out why the damn thing did not work, but I could not even find
the place where those qualifiers are evaluated. :-(

Besides, as I said earlier, I don't really think that such an
improvement would be of much use anyway, unless at the same time we find
away to allow referencing new and old (or at least new, which, I suspect
is much easier) from inside the union... I don't really understand the
reason why that cannot be supported (but I am sure, it's a good one)
:-), and without that I just can't think of any example where using the
union inside a rule would be useful for anything anyway, so, unless we
want to consider allowing new and old at the same time, it looks like
trying to make unions work isn't worth the effort... Just indicating
properly that they don't would be good enough


Dima




pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] INSTEAD rule bug?
Next
From: "yxy"
Date:
Subject: How can I unsubscribe the mail t list