Re: BUG #14924: Subquery in VALUES inside recursive CTE
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #14924: Subquery in VALUES inside recursive CTE |
| Дата | |
| Msg-id | 29657.1511543186@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #14924: Subquery in VALUES inside recursive CTE (christianmduta@gmail.com) |
| Ответы |
Re: BUG #14924: Subquery in VALUES inside recursive CTE
|
| Список | pgsql-bugs |
christianmduta@gmail.com writes:
> When working with recursive CTEs, I had the following happen:
Thanks for the report! Seems not to be specific to CTEs:
regression=# SELECT val.x FROM generate_series(1,10) AS s(i), LATERAL ( VALUES ((SELECT s.i + 1)), (s.i + 1) )
ASval(x) WHERE s.i < 10;
ERROR: SubPlan found with no parent plan
However, simplifying further, this works:
regression=# SELECT val.x FROM generate_series(1,10) AS s(i), LATERAL ( VALUES ((SELECT 1 + 1)), (s.i + 1) ) AS
val(x)WHERE s.i < 10;
so it looks like it's the LATERAL reference inside the sub-select
that is needed to trigger the bug.
Same results back to 9.3 :-(
regards, tom lane
В списке pgsql-bugs по дате отправления: