Re: Returnd Refcurser ( not fetchable
| От | Christian Kindler |
|---|---|
| Тема | Re: Returnd Refcurser ( |
| Дата | |
| Msg-id | 20070810061628.206070@gmx.net обсуждение исходный текст |
| Ответ на |
Returnd Refcurser ( |
| Ответы |
Re: Returnd Refcurser ( Re: Returnd Refcurser ( |
| Список | pgsql-sql |
Sorry but this didn't help ...
Can not return next ... so I changed the returns as too but same effect as the first function:
drop table foo;
create table foo(sirname text, name text);
insert into foo values ('Mueller', 'Marcus');
drop function getfoo(char(1));
create or replace function getfoo(char(1)) returns setof refcursor as
'
declare ref refcursor;
begin open ref for select * from foo where sirname like ''%'' || $1 || ''%''; return next ref;
end;
'
LANGUAGE 'plpgsql' VOLATILE;
select * from getfoo('M');
-- fetch all in '<unnamed portal 14>';
ERROR: syntax error at or near "'<unnamed portal 14>'" at character 15
--
cu
Chris
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
В списке pgsql-sql по дате отправления: