Download & Extend

Error in generated SQL query using PostgreSQL v 8.2.3

Project:Views Bonus Pack
Version:5.x-1.x-dev
Component:Lineage Nested
Category:bug report
Priority:critical
Assigned:Unassigned
Status:postponed (maintainer needs more info)

Issue Summary

Hi, If I try and use the tree lineage tree view I get the following error...

warning: pg_query() [function.pg-query]: Query failed: ERROR: column "term_lineage.tid" must appear in the GROUP BY clause or be used in an aggregate function in /Users/jasonstratford/Sites/cms/includes/database.pgsql.inc on line 125.

user warning: query: SELECT term_lineage.tid AS tid, term_lineage.depth AS term_lineage_depth, term_lineage.lineage AS term_lineage_lineage, term_data.name AS name, count(node.nid) AS num_nodes FROM (SELECT DISTINCT ON (nid) * FROM node) node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_lineage term_lineage ON term_node.tid = term_lineage.tid LEFT JOIN term_data term_data ON term_lineage.tid = term_data.tid WHERE (node.status = '1') AND (term_lineage.tid IS NOT NULL) GROUP BY term_data.name, term_lineage_lineage ORDER BY term_lineage_lineage ASC LIMIT 999 OFFSET 0 in /Users/jasonstratford/Sites/cms/includes/database.pgsql.inc on line 144.

I am not up to speed on the way drupal generates these queries so would appreciate some help debugging this.

Many thanks
Jason

Comments

#1

Status:active» postponed (maintainer needs more info)

This still valid? I don't have a postgres install to test this on so any help would be appreciated.