i'm setting up a forum that's connected to postgresql 7.4.2 (via drupal.org framework) and i'm getting some errors. i think that postgresql 7.4.2 strictly casts booleans into 1 or 0, so the "2" below might be the problem. here are the errors verbatim:

warning: pg_query(): Query failed: ERROR: invalid input syntax for type boolean: "2"
CONTEXT: PL/pgSQL function "if" line 2 at if in /Library/WebServer/Documents/dmap/includes/database.pgsql.inc on line 104.

user error:
query: SELECT DISTINCT(n.nid), l.last_comment_timestamp, IF(l.last_comment_uid, cu.name, l.last_comment_name) as last_comment_name, l.last_comment_uid FROM node n , node_comment_statistics l /*! USE INDEX (node_comment_timestamp) */, users cu, term_node r WHERE n.nid = r.nid AND r.tid = 1 AND n.status = 1 AND n.type = 'forum' AND l.last_comment_uid = cu.uid AND n.nid = l.nid AND '1' ORDER BY l.last_comment_timestamp DESC LIMIT 1 OFFSET 0 in /Library/WebServer/Documents/dmap/includes/database.pgsql.inc on line 121.

here's my system:
- drupal v4.5.1
- mac os x server v10.3.5
- postgresql v7.4.2
- php v4.3.6

Comments

killes@www.drop.org’s picture

was fixed.

Anonymous’s picture