BUG #17479: "plan should not reference subplan's variable" when calling `grouping` on result of subquery

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17479: "plan should not reference subplan's variable" when calling `grouping` on result of subquery
Дата
Msg-id 17479-6260deceaf0ad304@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17479: "plan should not reference subplan's variable" when calling `grouping` on result of subquery  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17479
Logged by:          Michael J. Sullivan
Email address:      sully@msully.net
PostgreSQL version: 14.2
Operating system:   Linux
Description:

The following query produces "plan should not reference subplan's
variable"

create table Card (id uuid);

SELECT
    -- This line causes "variable not found in subplan target list"
    -- grouping(res.cnt)
    -- This line causes "plan should not reference subplan's variable"
   (SELECT grouping(res.cnt))
FROM Card
CROSS JOIN LATERAL
(SELECT
    (SELECT Card.id) AS cnt
) AS res
GROUP BY
    res.cnt

As the comment says, a slight change instead errors with "variable not found
in subplan target list".


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Miloš Urbánek
Дата:
Сообщение: Re: BUG #17476: ERROR: "variable not found in subplan target list" when running SELECT COUNT(*)
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17480: Assertion failure in parse_relation.c