On 2/17/26 14:19, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 19412
> Logged by: Sergey Shinderuk
> Email address: s.shinderuk@postgrespro.ru
> PostgreSQL version: 17.8
> Operating system: Ubuntu 24.04
> Description:
git bisect shows the bug was introduced by commit 3af7040985b [0]
I suppose presence of UNION ALL subquery is important for the reproduction
because the commit uses RangeTblEntry->inh, which has the following remark
in the comment in src/include/nodes/parsenodes.h
* inh is true for relation references that should be expanded to
include
* inheritance children, if the rel has any. In the parser, this
will
* only be true for RTE_RELATION entries. The planner also uses this
* field to mark RTE_SUBQUERY entries that contain UNION ALL
queries that
* it has flattened into pulled-up subqueries (creating a
structure much
* like the effects of inheritance).
[0]
https://github.com/postgres/postgres/commit/3af7040985b6df504a72cd307aad5d69ac5f5384
Regards,
Artem Fadeev.
https://postgrespro.com