Re: BUG #19742: `INTERSECT` under a `UNION ALL` with an empty arm fails with "could not find pathkey item t" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19742: `INTERSECT` under a `UNION ALL` with an empty arm fails with "could not find pathkey item t"
Date
Msg-id 290582.1791092578@sss.pgh.pa.us
Whole thread
In response to Re: BUG #19742: `INTERSECT` under a `UNION ALL` with an empty arm fails with "could not find pathkey item t"  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: BUG #19742: `INTERSECT` under a `UNION ALL` with an empty arm fails with "could not find pathkey item t"
List pgsql-bugs
David Rowley <dgrowleyml@gmail.com> writes:
> I think the fix needs to be either don't remove redundant pathkeys for
> setop_pathkeys or use some other method to figure out which
> expressions to add in add_child_eq_member().

My own thoughts were along the lines of "don't ever assign pathkeys to
an AppendPath"; not sure if that's equivalent to your first idea.

In the long run I'd like to get rid of the varno-zero business
in favor of some less-magic representation; but that's clearly
not reasonable for v19.

            regards, tom lane



pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #19742: `INTERSECT` under a `UNION ALL` with an empty arm fails with "could not find pathkey item t"
Next
From: weijie JL
Date:
Subject: Re: BUG #19725: PostgreSQL 18.6: pg_restore read failure with io_uring, not observed with worker