Re: Optimization issue of branching UNION ALL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Optimization issue of branching UNION ALL
Date: 2022-12-22 16:05:36
Message-ID: 1961091.1671725136@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2022-12-22 16:15:54 Re: Schema variables - new implementation for Postgres 15 (typo)
Previous Message Ranier Vilela 2022-12-22 15:35:58 ARRNELEMS Out-of-bounds possible errors