Strictly speaking, both the adapters are implementing what’s right as per each database.
And since MySQL chose to implement “group by” clause differently and most rails devs have been using mysql as default database, we are used to use “group by” the mysql way.
As the link points out, the following query is allowed when the
ONLY_FULL_GROUP_BY option is not enabled (which I think is the
default):
SELECT name, address, MAX(age) FROM t GROUP BY name;
I've always thought this was a really bad default for MySQL, and
PostgreSQL is rightfully complaining that the query should be:
SELECT name, address, MAX(age) FROM t GROUP BY name, address;