kputnam / piggly

PL/pgSQL stored procedure code coverage tool
Other
69 stars 14 forks source link

Variant of issue #7 FOR-IN-EXECUTE #18

Closed lcoldiron closed 12 years ago

lcoldiron commented 13 years ago

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.

kputnam commented 13 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.

kputnam commented 12 years ago

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.

lcoldiron commented 12 years ago

Issue is fixed now. Thank you.