postgres=# do $$ declare r boo; -- cannot be generic record begin for r in select * from boo loop execute $_$insert into foo values($1."123")$_$ using r; end loop; end; $$; DO
Hello. Didn't find dedicated plpgsql list, so decided to post question here. I am trying to create a function that will pick up some values from cursor and execute them as a dynamic query. However, once i use EXECUTE, its seems to be ignoring the existence of cursor and try to pick up values from table. Basically: