Bug #662: In plpgsql, returning "text" instead of "setof text" puts backend in infinite loop

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #662: In plpgsql, returning "text" instead of "setof text" puts backend in infinite loop
Дата
Msg-id 20020510030512.2DB814759F6@postgresql.org
обсуждение исходный текст
Список pgsql-bugs
Kristis Makris (kristis.makris@datasoft.com) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
In plpgsql, returning "text" instead of "setof text" puts backend in infinite loop

Long Description
This was run against postgres 7.1.3. While experimenting with  "setof" in writing a plpgsql function I came across a
casewhere if text is returned in place of setof text, the backend never came up with a reply. top reported the
postmasterrunning at %99.9 until I Ctrl-C'ed. 

Sure, text should not be returned in place of setof text, but still...



=# select AAA(now());



Cancel request sent
ERROR:  Query was cancelled.
=#


Sample Code
create function AAA(date) returns setof text as '
declare
--    _date alias for $1;

    _reads text;
begin

    return _reads;
end;
' language 'plpgsql';


SELECT AAA(now());

No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Bug #659: lower()/upper() bug on ->multibyte<- DB
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #663: ERROR: SearchSysCache: Bad cache id 27