Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9

Поиск
Список
Период
Сортировка
Искать

Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9

От:
Rafael Martinez <r.m.guerrero@usit.uio.no>
Дата:
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, 
  Center for Information Technology Services
  University of Oslo, Norway

  PGP Public Key: http://folk.uio.no/rafael/>

Re: Problems with "anyelement" after upgrading from 8.1.4 to 8.1.9

От:
Michael Fuhr <mike@fuhr.org>
Дата:
On Sun, May 27, 2007 at 12:02:35PM +0200, Rafael Martinez wrote:
> 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

I think this has already been fixed in CVS:

http://archives.postgresql.org/pgsql-hackers/2007-05/msg00014.php
http://archives.postgresql.org/pgsql-committers/2007-05/msg00011.php

-- 
Michael Fuhr
FAQ