Re: BUG #17633: Define rule on views which do insert to another relation trigger cache lookup failed error.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, jiye_sw(at)126(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17633: Define rule on views which do insert to another relation trigger cache lookup failed error.
Date: 2022-10-11 15:37:12
Message-ID: 348879.1665502632@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> I think the basic problem is that the two calls of rewriteValuesRTE
> are really dealing with fundamentally different cases, and we should
> probably not have tried to make the same function do both. I'm going
> to try splitting it into two functions, one for the force_nulls case
> and one for the !force_nulls case.

As attached. This seems *way* cleaner to me, even if it means we need
two copies of the loops-over-VALUES-list-entries. I didn't write a
regression test yet, but this fixes the submitted bug and passes
check-world.

regards, tom lane

Attachment Content-Type Size
fix-bug-17633.patch text/x-diff 6.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Blum, Kimber 2022-10-11 15:57:29 RE: BUG #17634: Inconsistent view_definition in information_schema.views
Previous Message Tom Lane 2022-10-11 15:07:45 Re: BUG #17633: Define rule on views which do insert to another relation trigger cache lookup failed error.