Re: BUG #17700: An assert failed in prepjointree.c
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: xinwen@stu.scu.edu.cn,
pgsql-bugs@lists.postgresql.org
Date: 2022-11-28T12:32:45Z
Lists: pgsql-bugs
> On 28 Nov 2022, at 10:09, PG Bug reporting form <noreply@postgresql.org> wrote:
> When executing the following query:
>
> WITH table3 ( column34 ) AS NOT MATERIALIZED ( SELECT 1 ) SELECT 1 FROM (
> SELECT 1 FROM table3 WHERE column34 = ANY ( SELECT alias4 . column34 FROM
> table3 FULL JOIN table3 AS alias4 ON TRUE )) AS alias5 ;
The full join on the rhs of the semi join creates a PlaceHolderVar due to
table3 not being materialized. A slightly shorter repro is:
with table3 as not materialized (
select 1 as column34
)
select 1 from table3
where column34 in (
select alias4.column34 from table3
full join table3 as alias4 on true
);
--
Daniel Gustafsson https://vmware.com/
Commits
-
Remove bogus Assert and dead code in remove_useless_results_recurse().
- bb8d48cb9df1 12.14 landed
- aca695fb6847 13.10 landed
- 556c0b913be1 15.2 landed
- 51dfaa0b010c 16.0 landed
- 0224646beec6 14.7 landed