PostgreSQL requires all non-aggregated fields to be present in the GROUP BY clause

roderik - June 22, 2009 - 14:39
Project:Taxonomy Filter
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:solotandem
Status:closed
Description

The error which is seen so often:
for PostgreSQL (and the SQL92 standard AFAIK), all non-aggregated fields must be present in the GROUP BY clause.
In the case of the query below, this is the case for the vid & name fields, and also for the 'weight' field which is in the 'ORDER BY'.

This is a very standard bugreport/patch and should have zero effect on MySQL.

AttachmentSize
tf_psql.patch458 bytes

#1

roderik - June 23, 2009 - 15:03
Status:active» needs review

Forgot to set status. Though IMHO this patch should just be applied, not reviewed by 'the community'.

#2

solotandem - June 23, 2009 - 18:43
Title:PostgreSQL error» PostgreSQL requires all non-aggregated fields to be present in the GROUP BY clause
Assigned to:Anonymous» solotandem
Status:needs review» fixed

Thanks for spotting this.

Fixed in next dev release created after this comment.

#3

System Message - July 7, 2009 - 18:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.