Re: Check lateral references within PHVs for memoize cache keys - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Check lateral references within PHVs for memoize cache keys
Date
Msg-id CAMbWs48TGnh8s=9-hJge9Et4Crf9q+_oU4FVekLoX4ommi4CVg@mail.gmail.com
Whole thread Raw
In response to Check lateral references within PHVs for memoize cache keys  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Check lateral references within PHVs for memoize cache keys  (David Rowley <dgrowleyml@gmail.com>)
Re: Check lateral references within PHVs for memoize cache keys  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers

On Fri, Dec 9, 2022 at 5:16 PM Richard Guo <guofenglinux@gmail.com> wrote:
Actually we do have checked PHVs for lateral references, earlier in
create_lateral_join_info.  But that time we only marked lateral_relids
and direct_lateral_relids, without remembering the lateral expressions.
So I'm wondering whether we can fix that by fetching Vars (or PHVs) of
lateral references within PlaceHolderVars and remembering them in the
baserel's lateral_vars.

Attach a draft patch to show my thoughts.
 
Update the patch to fix test failures.

Thanks
Richard
Attachment

pgsql-hackers by date:

Previous
From: Ian Lawrence Barwick
Date:
Subject: Re: Getting rid of SQLValueFunction
Next
From: Peter Geoghegan
Date:
Subject: Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation