Re: [GENERAL] INSTEAD rule bug?

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] INSTEAD rule bug?
Date: 2003-07-16 14:41:41
Message-ID: 3F156425.70802@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Tom Lane wrote:

>Dmitry Tkach <dmitry(at)openratings(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-07-16 14:48:35 Re: [GENERAL] INSTEAD rule bug?
Previous Message Wehrle, Daniel 2003-07-16 07:37:48 Re: pg_dump -t option doesn't take schema-qualified table

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-07-16 14:48:35 Re: [GENERAL] INSTEAD rule bug?
Previous Message scott.marlowe 2003-07-16 14:40:30 Re: Firebird vrs Postgresql