pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Anton A. Melnikov <aamelnikov@inbox.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Richard Guo <guofenglinux@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, "Finnerty, Jim" <jfinnert@amazon.com>
Subject: Re: Making Vars outer-join aware
Date: Sun, 23 Jul 2023 15:20:21 +0300
Message-ID: <ef91a47a-e189-e881-d3ec-913096ca1719@inbox.ru> (raw )
In-Reply-To: <71315.1686243488@sss.pgh.pa.us >
References: <1035990.1667261942@sss.pgh.pa.us >
<2901865.1667685211@sss.pgh.pa.us >
<CAMbWs4_pH7w7voY0AejUM4RiKq-Xuf+sXmoF8PcQwzNrsagEXA@mail.gmail.com >
<CAMbWs4_gXgGdkkOraUPEoZD_Q3xTW7FTxfomW+fxPN2Kr-YSXg@mail.gmail.com >
<4019771.1672155080@sss.pgh.pa.us >
<CAMbWs4_JDDdXvEBWtTao9ZTwOGdDCU7X-=bF7yi9G1u_-b0Dfw@mail.gmail.com >
<323812.1672241806@sss.pgh.pa.us >
<2043562.1674506286@sss.pgh.pa.us >
<20230212235823.GW1653@telsasoft.com >
<CAMbWs4-K8_yqARnrmRB5=xAWTJGgTpimQinvaa-k6c8f6Hideg@mail.gmail.com >
<20230213184807.GF1653@telsasoft.com >
<5b370a46-f6d2-373d-9dbc-0d55250e82c1@inbox.ru >
<3197069.1683202924@sss.pgh.pa.us >
<9290bdfc-cc61-4b78-27ea-340237e341b3@inbox.ru >
<71315.1686243488@sss.pgh.pa.us >
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
view thread (60+ messages)
Message-ID: <ef91a47a-e189-e881-d3ec-913096ca1719@inbox.ru>
Permalink: ../ef91a47a-e189-e881-d3ec-913096ca1719@inbox.ru/
Also on: postgresql.org/message-id/ef91a47a-e189-e881-d3ec-913096ca1719@inbox.ru
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: aamelnikov@inbox.ru, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, guofenglinux@gmail.com, jfinnert@amazon.com
Subject: Re: Making Vars outer-join aware
In-Reply-To: <ef91a47a-e189-e881-d3ec-913096ca1719@inbox.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox