Re: Making Vars outer-join aware - Mailing list pgsql-hackers

From Anton A. Melnikov
Subject Re: Making Vars outer-join aware
Date
Msg-id ef91a47a-e189-e881-d3ec-913096ca1719@inbox.ru
Whole thread Raw
In response to Re: Making Vars outer-join aware  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 08.06.2023 19:58, Tom Lane wrote:
> I think the right thing here is not either of your patches, but
> to tweak adjust_relid_set() to not fail on negative oldrelid.
> I'll go make it so.

Thanks! This fully solves the problem with ChangeVarNodes() that i wrote above.


> Hmm.  That implies that you're changing plan data structures around after
> setrefs.c, which doesn't seem like a great design to me --- IMO that ought
> to happen in PlanCustomPath, which will still see the original varnos.

My further searchers led to the fact that it is possible to immediately set the
necessary varnos during custom_scan->scan.plan.targetlist creation and leave the
сustom_scan->custom_scan_tlist = NIL rather than changing them later using ChangeVarNodes().
This resulted in a noticeable code simplification.
Thanks a lot for pointing on it!

Sincerely yours,

-- 
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Use of additional index columns in rows filtering
Next
From: Ahmed Ibrahim
Date:
Subject: Re: There should be a way to use the force flag when restoring databases