Postgresql GROUP BY query fix

pearcec - September 15, 2008 - 17:15
Project:Advanced Poll
Version:5.x-1.0-beta6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Problem:

* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "u.name" must appear in the GROUP BY clause or be used in an aggregate function in /websites/afilias.info/afilias.info-Build-#/current/includes/database.pgsql.inc on line 125.
* user warning: query: SELECT v.uid, v.hostname, v.timestamp, u.name FROM votingapi_vote v LEFT JOIN users u ON v.uid = u.uid WHERE v.content_type = 'advpoll' AND v.content_id = 30 GROUP BY v.uid, v.hostname, v.timestamp ORDER BY u.name ASC LIMIT 20 OFFSET 0 in /websites/afilias.info/afilias.info-Build-#/current/includes/database.pgsql.inc on line 144.

Patch attached:

AttachmentSize
advpoll.module_pgsql_group_by.patch949 bytes

#1

ChrisKennedy - December 8, 2008 - 05:39
Status:needs review» fixed

Fixed, thanks for the report & patch.

#2

System Message - December 22, 2008 - 05:42
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.