Re: Refcursor problem

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Refcursor problem
Дата
Msg-id 200201031909.g03J9W216310@saturn.jw.home
обсуждение исходный текст
Ответ на Re: Refcursor problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:
> Dmitry Fomichev <dfomichev@reldata.com> writes:
> > I am running 7.2b3 and trying to make something like this work (new
> > refcursor stuff):
>
> > CREATE TABLE t (c text);
>
> > CREATE FUNCTION errtest(refcursor, text) RETURNS refcursor AS '
> > BEGIN
> >         OPEN $1 FOR SELECT c FROM t WHERE c=$2;
> >         RETURN $1;
> > END;
> > ' LANGUAGE 'plpgsql';
>
> > INSERT INTO t VALUES ('123');
>
> > BEGIN;
> > SELECT errtest('rs', '123');
> > FETCH ALL IN rs;
> > COMMIT;
>
> > I am getting this error after FETCH ALL....
>
> > psql:errtest.sql:15: ERROR:  MemoryContextAlloc: invalid request size
> > 2139062147
>
> Nasty.  It looks like SPI_cursor_open needs to be careful to copy
> by-reference parameter values into the memory context created for
> the cursor portal.  Will fix.

    It doesn't do? Blame it on me. Thanks.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #556: Problem with ODBC Driver Version 7.1.9, DB Version 7.1.3
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #557: triggers tablename are not rename if table are renamed.