I've no idea if this is the proper way to append information about an
existing bug report, please advise if not.
The bug #6020 seems to have bit me, too, this kind of a query fails under
SELECT * FROM acl_get_list('news', 258, 0);
ERROR: wrong record type supplied in RETURN NEXT
DETAIL: Returned type bpchar does not match expected type character(4) in column 3.
CONTEXT: PL/pgSQL function "acl_get_list" line 9 at RETURN NEXT
Where the code is:
CREATE TYPE acl_list AS (
CREATE OR REPLACE FUNCTION acl_get_list(CHAR(4), INTEGER, INTEGER) RETURNS SETOF acl_list AS '
p_acl_id ALIAS FOR $1;
p_acl_object_id ALIAS FOR $2;
p_lev ALIAS FOR $3;
FOR rec IN SELECT * FROM acl_inherits WHERE acl_id = p_acl_id AND object_id = p_acl_object_id LOOP
FOR rec1 IN SELECT * FROM acl_get_list(rec.parent_acl_id, rec.parent_object_id, p_lev + 1) LOOP
RETURN NEXT rec1;
This worked just fine in 8.1, 8.3, 8.4, and doesn't seem wrong.
(Coupled with http://bugs.debian.org/630569, this upgrade cycle
has not been happy at all for me... :()
2. That which causes joy or happiness.
In response to
pgsql-bugs by date
|Next:||From: Robert Haas||Date: 2011-06-16 19:39:03|
|Subject: Re: Behaviour of triggers on replicated and non replicated tables|
|Previous:||From: Guillaume Smet||Date: 2011-06-16 08:00:40|
|Subject: Re: BUG #6061: Progresql.exe memory usage using HOLD cursor.|