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 |
Jump to:
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:
| Attachment | Size |
|---|---|
| advpoll.module_pgsql_group_by.patch | 949 bytes |

#1
Fixed, thanks for the report & patch.
#2
Automatically closed -- issue fixed for two weeks with no activity.