Closed lcoldiron closed 12 years ago
Strange, I still cannot reproduce this. Have a look at spec/issues/018_spec.rb.
Try rm lib/piggly/parser/parser.rb
-- this file gets built from grammar.tt
as needed, but maybe it wasn't rebuilt correctly. If your spec passes but you're still having problems with actual procedures, please edit the spec until you can get it to fail.
Luke, any success in reproducing the issue? I wasn't able to reproduce the problem with your example. You should be able to hack on the example in spec/issues/018_spec.rb until you get it to fail.
Issue is fixed now. Thank you.
CREATE OR REPLACE FUNCTION public.my_func() RETURNS VOID AS $BODY$ DECLARE schema TEXT = 'pg_catalog'; r RECORD; BEGIN FOR r IN EXECUTE 'SELECT * FROM ' || quote_ident(schema) || 'pg_user;' LOOP END LOOP; END; $BODY$ LANGUAGE plpgsql VOLATILE SECURITY DEFINER;
Doesn't seem to like this FOR-IN-EXECUTE statement.