Re: BUG #17088: FailedAssertion in prepagg.c
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>, cyg0810@gmail.com,
pgsql-bugs@lists.postgresql.org
Date: 2021-07-07T21:18:01Z
Lists: pgsql-bugs
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: Tom> An alternative theory is that we should never have done anything Tom> at all to the argument tree of a GroupingFunc. Since it's not Tom> supposed to be evaluated, treating it as a target for expression Tom> preprocessing might be a mistake altogether. I wonder why its Tom> arguments aren't stored as sortgroupref indexes or the like. The arguments are stored as sortgrouprefs (the "refs" list) for actual use; the "args" list is only kept for the benefit of EXPLAIN and deparsing. A number of places in the planner have to explicitly avoid recursing into GroupingFunc->args when walking trees specifically because they are not evaluated. It looks to me like some places where that should have been checked for were missed. Looking into it. -- Andrew (irc:RhodiumToad)
Commits
-
Fix assorted missing logic for GroupingFunc nodes.
- dfefe38fbea4 13.7 landed
- 69c88e2fb0aa 12.11 landed
- 5de244196a5b 11.16 landed
- 48b6035f0f72 14.3 landed
- 2afa031ac552 10.21 landed
- 2591ee8ec44d 15.0 landed