Re: Making Vars outer-join aware

Поиск
Список
Период
Сортировка
От Anton A. Melnikov
Тема Re: Making Vars outer-join aware
Дата
Msg-id ef91a47a-e189-e881-d3ec-913096ca1719@inbox.ru
обсуждение исходный текст
Ответ на Re: Making Vars outer-join aware  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Use of additional index columns in rows filtering
Следующее
От: Ahmed Ibrahim
Дата:
Сообщение: Re: There should be a way to use the force flag when restoring databases