pgsql: Fix broken MemoizePath support in reparameterize_path().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix broken MemoizePath support in reparameterize_path().
Date: 2022-12-04 18:48:35
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix broken MemoizePath support in reparameterize_path().

It neglected to recurse to the subpath, meaning you'd get back
a path identical to the input. This could produce wrong query
results if the omission meant that the subpath fails to enforce
some join clause it should be enforcing. We don't have a test
case for this at the moment, but the code is obviously broken
and the fix is equally obvious. Back-patch to v14 where
Memoize was introduced.

Richard Guo

Discussion: https://postgr.es/m/CAMbWs4_R=ORpz=Lkn2q3ebPC5EuWyfZF+tmfCPVLBVK5W39mHA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e76913802c5347831aadc1513b59196bde6ec116

Modified Files
--------------
src/backend/optimizer/util/pathnode.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-12-04 19:26:07 pgsql: Re-pgindent a few files.
Previous Message David Rowley 2022-12-04 03:18:57 pgsql: Improve performance of pg_strtointNN functions