finally using correct version of pg on server. hopefully "group by" is fixed