Hello
I am using an application that has this function defined in the database:
Schema | Name | Result data type | Argument data types |
Owner | Language | Source code | Description
--------+------+------------------+---------------------------------+------------+----------+-------------+-------------
public | if | anyelement | boolean, anyelement, anyelement |
drupal | sql |
SELECT CASE WHEN $1 THEN $2 ELSE $3 END;
This function is used in some select queries, for example:
SELECT n.nid, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name)
.......
Until postgresql 8.1.4, this has been working without problems.
Yesterday I upgraded this database to 8.1.9 and select queries using the
IF function fail with this error message:
ERROR: cannot display a value of type anyelement
Any idea why this happens and how we can fix it?
Thanks in advance.
--
Rafael Martinez, <r.m.guerrero@usit.uio.no>
Center for Information Technology Services
University of Oslo, Norway
PGP Public Key: http://folk.uio.no/rafael/>