According to the documentation of PG on GROUP BY:
An expression used inside a grouping_element can be an input column name, or the name or ordinal number of an output column (SELECT list item), or an arbitrary expression formed from input-column values
However, the current version of Squeal is limited to columns, not "an arbitrary expression formed from input-column values". Though I suppose these would be fairy rare, and hard to fit inside the type system, I have one case which should not be that rare: a GROUP BY using a COALESCE over two fields (context: a FULL OUTER JOIN with two similar columns). I'm gonna try to find a way to shortcut this through an UnsafeGrouping expression, but it could be worth it (in the long term, obviously) to investigate ways to model more complex GROUP BY expressions.
According to the documentation of PG on GROUP BY:
However, the current version of Squeal is limited to columns, not "an arbitrary expression formed from input-column values". Though I suppose these would be fairy rare, and hard to fit inside the type system, I have one case which should not be that rare: a GROUP BY using a COALESCE over two fields (context: a FULL OUTER JOIN with two similar columns). I'm gonna try to find a way to shortcut this through an UnsafeGrouping expression, but it could be worth it (in the long term, obviously) to investigate ways to model more complex GROUP BY expressions.