]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix oversight in recent MULTIEXPR_SUBLINK fix.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 2 Sep 2022 18:54:40 +0000 (14:54 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 2 Sep 2022 18:54:40 +0000 (14:54 -0400)
commitdf92bc115ec8712cfdd0c7a26ef20b11914ab0a2
tree6d9e7276b6ed8ba5867d673b26408b357b319440
parentf249f1026f71bd8f2e820f1895b745d59fab041e
Fix oversight in recent MULTIEXPR_SUBLINK fix.

Commits 3f7323cbb et al missed the possibility that the Params
they are looking for could be buried under implicit coercions,
as well as other stuff that processIndirection() could add to
the original targetlist entry.  Copy the code in ruleutils.c
that deals with such cases.  (I thought about refactoring so
that there's just one copy; but seeing that we only need this
in old back branches, it seems not worth the trouble.)

Per off-list report from Andre Lin.  As before, only v10-v13
need the patch.

Discussion: https://postgr.es/m/17596-c5357f61427a81dc@postgresql.org
src/backend/optimizer/plan/subselect.c
src/test/regress/expected/inherit.out
src/test/regress/sql/inherit.sql