If there is a primary key column in the GROUP BY clause, every group will have
only one row. In this case, even if there ungrouped columns in the query, PG 9.2
doesn't raise any error. But this behaviour is only allowed if the functional
dependence of the ungrouped columns is not needed to be inferred from subqueries
(if there are any). In Postres-XC the queries are constructed by creating one
sub-query for every relation being built in the plan tree. Hence functional
grouping code is not able to infer the functional grouping in the queries
constructed by Postres-XC planner at the coordinator. Hence do not ship GROUP BY
clause when there is functional grouping in the query.

Functional grouping also means that there is one row per group, thus grouping at
the datanode is not expected to improve performance (may decrease it).