pg_query() error when accessing group members tab, and no group is displayed :

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: argument of WHERE must be type boolean, not type integer in /home/www/includes/database.pgsql.inc on line 139.
    * user warning: query: SELECT COUNT(*) FROM users u JOIN (SELECT uid, is_active, is_admin FROM og_uid WHERE nid=298 AND is_active != 0) g ON u.uid = g.uid WHERE u.uid in /home/www/sites/all/modules/groupadmin/groupadmin.module on line 121.
    * warning: pg_query() [function.pg-query]: Query failed: ERROR: argument of WHERE must be type boolean, not type integer in /home/www/includes/database.pgsql.inc on line 139.
    * user warning: query: SELECT u.name, u.uid, u.mail, g.is_active, g.is_admin FROM users u JOIN (SELECT uid, is_active, is_admin FROM og_uid WHERE nid=298 AND is_active != 0) g ON u.uid = g.uid WHERE u.uid ORDER BY name ASC LIMIT 30 OFFSET 0 in /home/www/sites/all/modules/groupadmin/groupadmin.module on line 121.

Site running :
Drupal 6.17
PostgreSQL 8.3.11
Apache/2.2.11 (Ubuntu)
PHP/5.2.6-3ubuntu4.5 with Suhosin-Patch

Comments

pmunch’s picture

Please consider first that my db/sql knowledge is very light, moreover on postgresql (unfortunately my client needs it...)

This said, I found a thread which I think (although it's relative to D7) deals with the same kind of issue :
#467474: Type casting boolean values as integers for PostgreSQL Driver

Anyone heard of such pb with D6 pg driver ?
Could this be causing the error ?

andy inman’s picture

Status: Active » Postponed (maintainer needs more info)

Try replacing...

WHERE u.uid

with...

WHERE u.uid

I think that *may* work. But, I'm not familiar with Postgress either, just guessing at what the problem may be.