PostgreSQL bug in Drupal Core 5 not fixed until 5.9
SoAnIs - April 20, 2008 - 18:57
| Project: | ACL |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Turning ACL on gives errors when trying to view the forums (/forum).
Active modules: ACL, Color, Comment, Contact, Database Logging, Forum, Help, Menu, Poll, Profile, Search, Statistics, Taxonomy, Tracker, Update Status, Upload, Img, Img comments, IP anonymizer, Addresses, BBCode, BUEditor, DHTML Menus, Persistent Login, Salt, Wikitools, Captcha, reCaptcha, Apply for Role
Forum Access & ACL were previously activated together, caused the same errors, so I tried disabling both and only enabling ACL. The errors are still present.
Errors:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT r.tid, COUNT( DISTINCT ON (n.nid) n.nid) AS topic_cou... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT r.tid, COUNT( DISTINCT ON (n.nid) n.nid) AS topic_count, SUM(l.comment_count) AS comment_count FROM node n INNER JOIN node_comment_statistics l ON n.nid = l.nid INNER JOIN term_node r ON n.vid = r.vid WHERE n.status = 1 GROUP BY r.tid in /home/soanis/public_html/modules/forum/forum.module on line 511.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 1 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 3 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 4 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 5 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 7 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 9 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 8 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 10 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "ON" LINE 1: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER J... ^ in /home/soanis/public_html/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT( DISTINCT ON (n.nid) n.nid) FROM node n INNER JOIN term_node tn ON n.vid = tn.vid AND tn.tid = 11 LEFT JOIN history h ON n.nid = h.nid AND h.uid = 1 WHERE n.status = 1 AND n.created > 1206001890 AND h.nid IS NULL in /home/soanis/public_html/modules/forum/forum.module on line 559.
#1
This is a duplicate of #223835: PostgreSQL bug in Drupal Core 5 not fixed until 5.9 in the Forum Access queue, but I'll leave it active here, too.
PostgreSQL users: please go to #128846: Rewritten PostgreSQL queries fail and review the patch in #70 (#69 for D6), so that it can get committed!
#2
(make title fit on issues list)
#3
This issue has been fixed in Drupal
5.8 and6.3 core.Please upgrade your Drupal installation.
#4
Oops, it turns out that the patch made it into 6.3, but it was too late for 5.8. This means for Drupal 5, it won't be fixed until the future 5.9.
If you need it fixed now, you should be able to apply the patch in http://drupal.org/node/128846#comment-805250 to 5.8. Let us know if it works for you.
I'll keep this open for reference.
#5
Ok, the patch is in 5.9. I can't test it myself because I don't have pgsql, but I think it's finally fixed now.
#6
Automatically closed -- issue fixed for two weeks with no activity.