warning: pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list in includes\database.pgsql.inc on line 125.
user warning: query: SELECT DISTINCT(n.nid) FROM node n INNER JOIN project_issues p ON p.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON p.assigned = u.uid LEFT JOIN project_comments c ON c.nid = p.nid WHERE n.status = 1 AND (((n.uid = '1') OR (p.assigned = '1') OR (c.uid = '1'))) AND ((p.sid = '1' OR p.sid = '2' OR p.sid = '8' OR p.sid = '13' OR p.sid = '14' OR p.sid = '4')) ORDER BY n.changed DESC LIMIT 20 OFFSET 0 in includes\database.pgsql.inc on line 144.

Found at page ?q=project/issues/user.

Comments

doq’s picture

Project: Project » Project issue tracking
Version: 5.x-1.x-dev » 5.x-2.x-dev
dww’s picture

Title: one more pgsql bug » SQL error on "My issues" page with PostgreSQL
Status: Active » Needs review

Rok Žlender recently posted a patch for this in the (duplicate) http://drupal.org/node/118264 issue.
http://drupal.org/files/issues/issue.inc_.postgres.patch

dww’s picture

Status: Needs review » Fixed

finally got a chance to get my pgsql test environment working again on my laptop. ;) now i can test stuff like this with the same code on 2 sites, 1 talking to a mysql db, the other to pgsql...

anyway, i could easily reproduce the bug on pgsql, this patch indeed solves it, and everything still works on mysql. committed to HEAD, DRUPAL-4-7--2 and DRUPAL-4-7.

thanks!
-derek

Anonymous’s picture

Status: Fixed » Closed (fixed)