model-writtenrun 7128 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Webbo Han reported that case-insensitive GROUP BY returned ten groups instead of five when partitioning used the C collation, identifying the missing collation check and the need to handle RelabelType expressions in #1.
- Tender Wang initially proposed changing partition-key expression metadata in plancat.c in #2 and corrected the test to enable partitionwise aggregation in #4, while Aleksander Alekseev requested deterministic test output in #3.
- Posting as 狂奔的蜗牛, Webbo Han supplied an alternative that checked the partition scheme's collation directly in group_by_has_partkey() and handled RelabelType in #5; Tender reviewed its coding style in #8.
- Tender abandoned his metadata change and revised Han's implementation in #9, removing RelabelType handling and borrowing the partition-pruning collation-check pattern, then added stable case-insensitive SELECT results in #11.
- Han demonstrated why an explicit COLLATE clause required RelabelType handling in #10 and challenged both its removal and the permissive InvalidOid check in #12, while Tender requested additional regression coverage in #13.
- After the August discussion paused, Amit Langote explained in #14 that partitioning may legitimately use a different collation from its column and noted a CREATE TABLE documentation gap; Tender then reopened the metadata approach, prompting concern about expression partition keys and other consumers of partexprs in #16 through #20.
- Tender reported a related partitionwise-join wrong-result case in #21 and successful regression testing of his original approach in #22, but Jian He showed that expression partition keys could still carry a different collation in #23.
- Tender accepted Jian's objection and moved the related join issue to thread #50440 in #24; Amit subsequently confirmed that the grouping fix was also being discussed there in #25.
- Amit committed 46d9be5efb from the later revision #575011 in thread #50440, superseding this thread's #11 as the source; the final implementation strips RelabelType, rejects mismatched collations for full partitionwise grouping while permitting partial aggregation, and adds ICU regression coverage.
- Amit announced that the grouping fix had been pushed through PostgreSQL 12 in #26, and Tender acknowledged completion in #27; the related join work had moved elsewhere, and no fix for the noted documentation gap is shown in this thread.