Re: BUG #17633: Define rule on views which do insert to another relation trigger cache lookup failed error.
Japin Li <japinli@hotmail.com>
From: Japin Li <japinli@hotmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: jiye_sw@126.com, pgsql-bugs@lists.postgresql.org
Date: 2022-10-11T12:29:16Z
Lists: pgsql-bugs
Attachments
- fix-trigger-cache-lookup-failed.patch (text/x-patch) patch
On Tue, 11 Oct 2022 at 20:09, Richard Guo <guofenglinux@gmail.com> wrote: > > I think the problem exists for auto-updatable view, as we leave the > DEFAULT items untouched because we expect to apply the underlying base > rel's default. > > In this case there is a rewrite rule on the view. Applying the rule > we'd get a product query whose target entries referring to the VALUES > RTE have attribute 3 and 4 while the relation has only two attributes. > Then we proceed to replacing the remaining DEFAULT items with NULLs. > And when we try to access the relation's 3rd and 4th attributes, we are > accessing illegal memory areas. > Yeah, I also notice this, attch a patch to fix it. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd.
Commits
-
Yet further fixes for multi-row VALUES lists for updatable views.
- addde9bc6caf 11.18 landed
- abc510fa2a34 12.13 landed
- 23e2a06acf04 10.23 landed
- b8f2687fdc41 16.0 landed
- 3162bd95cad3 14.6 landed
- 21e042b0bd47 13.9 landed
- 07ce6769824c 15.1 landed