From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Optimization issue of branching UNION ALL
Date: Thu, 22 Dec 2022 11:05:36 -0500
Message-ID: <1961091.1671725136@sss.pgh.pa.us> (raw)
In-Reply-To: <628db719-9c26-7aa3-540d-9b6d68e68da6@postgrespro.ru>
References: <703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru>
<1788831.1671673839@sss.pgh.pa.us>
<628db719-9c26-7aa3-540d-9b6d68e68da6@postgrespro.ru>
Andrey Lepikhov <a.lepikhov@postgrespro.ru> writes:
> Thanks, I have written the letter because of some doubts too. But only
> one weak point I could imagine - if someday sql standard will be changed.
Yeah, if they ever decide that LATERAL should be allowed to reference a
previous sub-query of UNION ALL, that'd probably break this. But it'd
break a lot of other code too, so I'm not going to worry about it.
I pushed the main fix to HEAD only, and the recursion checks to
all branches.
regards, tom lane
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: tgl@sss.pgh.pa.us, a.lepikhov@postgrespro.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: Optimization issue of branching UNION ALL
In-Reply-To: <1961091.1671725136@sss.pgh.pa.us>
* 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