Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9 - Mailing list pgsql-general

From Rafael Martinez
Subject Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9
Date
Msg-id 4659573B.4030206@usit.uio.no
Whole thread Raw
Responses Re: Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9
List pgsql-general
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/>

pgsql-general by date:

Previous
From: Lincoln Yeoh
Date:
Subject: Re: why postgresql over other RDBMS
Next
From: Michael Fuhr
Date:
Subject: Re: Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9