pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Optimization issue of branching UNION ALL
Date: Wed, 21 Dec 2022 22:48:55 -0500
Message-ID: <1800456.1671680935@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs49fj701dxtmo9A7e+Bu_aR1xyLNPL4dPG+W0cT43QKgyg@mail.gmail.com>
References: <703c09a2-08f3-d2ec-b33d-dbecd62428b8@postgrespro.ru>
	<1788831.1671673839@sss.pgh.pa.us>
	<CAMbWs49fj701dxtmo9A7e+Bu_aR1xyLNPL4dPG+W0cT43QKgyg@mail.gmail.com>

Richard Guo <guofenglinux@gmail.com> writes:
> I noticed we also check 'parse->hasSubLinks' when we fix PHVs and
> AppendRelInfos in pull_up_simple_subquery.  I'm not sure why we have
> this check.  It seems not necessary.

Yeah, I was wondering about that too ... maybe it was important
in some previous state of the code?  I didn't do any archeology
though.

> In remove_result_refs, I don't think we need to check 'lastPHId' again
> before calling substitute_phv_relids, since it has been checked a few
> lines earlier.

Oh, duh ...

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <1800456.1671680935@sss.pgh.pa.us>
Permalink:  ../1800456.1671680935@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1800456.1671680935@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, a.lepikhov@postgrespro.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: Optimization issue of branching UNION ALL
  In-Reply-To: <1800456.1671680935@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