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
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

salvis - April 20, 2008 - 20:04
Title:Errors with PostgreSQL 8.3, Drupal 6.2, and ACL 6.x-1.x-dev» PLEASE REVIEW!!! — PostgreSQL bug in Drupal Core 5&6
Status:active» patch (code needs review)

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

salvis - April 20, 2008 - 22:18
Title:PLEASE REVIEW!!! — PostgreSQL bug in Drupal Core 5&6» PLEASE REVIEW! — PostgreSQL bug in Drupal Core 5&6

(make title fit on issues list)

#3

salvis - July 20, 2008 - 15:17
Status:patch (code needs review)» fixed

This issue has been fixed in Drupal 5.8 and 6.3 core.

Please upgrade your Drupal installation.

#4

salvis - July 20, 2008 - 15:21
Title:PLEASE REVIEW! — PostgreSQL bug in Drupal Core 5&6» PostgreSQL bug in Drupal Core 5 not fixed until 5.9
Status:fixed» patch (to be ported)

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

salvis - July 28, 2008 - 20:18
Status:patch (to be ported)» fixed

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

Anonymous (not verified) - August 11, 2008 - 20:22
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.