There are several SQL orders that are not compatible with PostgreSQL.

query: SELECT COUNT(*) as count, r.* FROM users_roles ur
     LEFT JOIN users u ON ur.uid = u.uid
     LEFT JOIN role r ON r.rid = ur.rid
     GROUP BY r.rid ORDER BY r.name
  in /usr/clients/www/drupal/sites/all/modules/chart/contrib/system_charts/system_charts.module on line 269.

The error is explained below:

pg_query() [function.pg-query]: Query failed: ERROR: column "r.name" must appear in the GROUP BY clause or be used in an aggregate function in /usr/clients/www/drupal/includes/database.pgsql.inc on line 187.

So you need to add r.name in the GROUP BY as in:

  GROUP BY r.rid, r.name

It makes no difference to MySQL which does not follow the SQL references to the letter (and thus is quite bogus.)

Thank you.
Alexis

Comments

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Active » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.