Some queries don't work in PostgreSQL

rdcapasso - August 24, 2007 - 16:40
Project:Directory
Version:6.x-1.0-alpha1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

e.g.
SELECT COUNT(*)
FROM p6_node n
INNER JOIN p6_term_node t
ON t.nid = n.nid
WHERE 1 AND n.type NOT IN ('0','1','0')
AND n.status = 1
AND t.tid = 465;

There exist four queries int the directory_get_nodes_by_term function which contain the statement "WHERE 1". This does not work in PostgreSQL. I've replaced WHERE 1 with WHERE 1=1, which causes the query to not fail. Removing 'WHERE 1' also alleviates this problem. I have not tested the changes on MySQL.

#1

beginner - July 16, 2008 - 06:58
Version:5.x-2.0» 6.x-1.0-alpha1
Status:active» fixed

There is no such query anymore in the D6 version.

See the new D6 alpha release announcement:
http://drupal.org/node/283259

#2

Anonymous (not verified) - July 31, 2008 - 04:46
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.