Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Teaching planner to short-circuit empty UNION/EXCEPT/INTERSECT inputs
Date: 2025-11-05 09:44:58
Message-ID: CAApHDvpC+vso+v2aSnqYG5_LKQqFnv9x1OrocEyFo__ek0xusg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 5 Nov 2025 at 18:26, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> I'm considering restricting that code Path to where the
> path->parent->reloptkind != RELOPT_UPPER_REL.

I couldn't think of anything better, so here's a patch to that effect.

David

Attachment Content-Type Size
v1-0001-Fix-UNION-planner-estimate_num_groups-with-varno-.patch application/octet-stream 4.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2025-11-05 09:51:18 Re: Implement waiting for wal lsn replay: reloaded
Previous Message Alexander Korotkov 2025-11-05 09:44:46 pgsql: Implement WAIT FOR command