parseCheckAggregates vs. assign_query_collations
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: pgsql-hackers@postgresql.org
Date: 2019-01-16T17:02:07Z
Lists: pgsql-hackers
Looking into a bug report on the -general list about grouping sets, which turns out to be an issue of collation assignment: if the query has CASE GROUPING(expr) WHEN 1 ... then the expression is rejected as not matching the one in the GROUP BY clause, because CASE already assigned collations to the expression (as a special case in its transform function) while the rest of the query hasn't yet had them assigned, because parseCheckAggregates gets run before assign_query_collations. I'll be looking into this in detail later, but right now, cam anyone think of any reason why parseCheckAggregates couldn't be moved to after assign_query_collations? -- Andrew (irc:RhodiumToad)
Commits
-
Postpone aggregate checks until after collation is assigned.
- d16d45387095 12.0 landed
- 174fab993414 9.4.21 landed
- 91448e7dcc1f 9.5.16 landed
- 624046abe23f 9.6.12 landed
- 409230a721cf 10.7 landed
- e74d8c5085aa 11.2 landed