Hello,
I get the following error when I go into forums :
warning: pg_query(): Query failed: ERROR: function if(integer, character varying, character varying) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /var/www/drupal/includes/database.pgsql.inc on line 45.
user error:
query: SELECT 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, users cu, term_node r WHERE n.nid = r.nid AND r.tid = 2 AND n.status = 1 AND n.type = 'forum' AND l.last_comment_uid = cu.uid AND n.nid = l.nid ORDER BY l.last_comment_timestamp DESC LIMIT 1 OFFSET 0 in /var/www/drupal/includes/database.pgsql.inc on line 62.
warning: pg_query(): Query failed: ERROR: function if(integer, character varying, character varying) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /var/www/drupal/includes/database.pgsql.inc on line 45.
user error:
query: SELECT 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, users cu, term_node r WHERE n.nid = r.nid AND r.tid = 3 AND n.status = 1 AND n.type = 'forum' AND l.last_comment_uid = cu.uid AND n.nid = l.nid ORDER BY l.last_comment_timestamp DESC LIMIT 1 OFFSET 0 in /var/www/drupal/includes/database.pgsql.inc on line 62.
warning: pg_query(): Query failed: ERROR: function if(integer, character varying, character varying) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /var/www/drupal/includes/database.pgsql.inc on line 45.
user error:
query: SELECT 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, users cu, term_node r WHERE n.nid = r.nid AND r.tid = 4 AND n.status = 1 AND n.type = 'forum' AND l.last_comment_uid = cu.uid AND n.nid = l.nid ORDER BY l.last_comment_timestamp DESC LIMIT 1 OFFSET 0 in /var/www/drupal/includes/database.pgsql.inc on line 62.
I suspect a problem in the plpgsql function :
CREATE FUNCTION "if"(boolean, anyelement, anyelement) RETURNS anyelement AS '
SELECT CASE WHEN $1 THEN $2 ELSE $3 END;
' LANGUAGE 'sql';
Comments
Comment #1
plj commentedThis is a duplicate of this bug.