BUG #5549: Feature: plpgsql should allow DECLARE cursor FOR EXECUTE '...'
От | David Schmitt |
---|---|
Тема | BUG #5549: Feature: plpgsql should allow DECLARE cursor FOR EXECUTE '...' |
Дата | |
Msg-id | 201007091211.o69CBumY096641@wwwmaster.postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #5549: Feature: plpgsql should allow DECLARE cursor FOR EXECUTE '...'
|
Список | pgsql-bugs |
The following bug has been logged online: Bug reference: 5549 Logged by: David Schmitt Email address: david@dasz.at PostgreSQL version: 8 and 9 Operating system: n/a Description: Feature: plpgsql should allow DECLARE cursor FOR EXECUTE '...' Details: This is not implemented: --------------------------------------------------------------------- CREATE OR REPLACE FUNCTION foo(tbl text) RETURNS void AS $BODY$ DECLARE working_cursor NO SCROLL CURSOR FOR EXECUTE $$SELECT something $$ || tbl || $$ ... $$; BEGIN FOR rec IN working_cursor LOOP -- ... END LOOP; END$BODY$ LANGUAGE 'plpgsql' VOLATILE; --------------------------------------------------------------------- The obvious workaround is hand-coding the LOOP with OPEN ... FOR EXECUTE and manual FETCHing, but it would be great to have this missing piece supported in syntax and avoid duplicating the error-prone hand-coding. Thanks for your time and work!
В списке pgsql-bugs по дате отправления: