I saw this in the mailing list archives without an answer, so for future reference:
DECLARE ... line TEXT; BEGIN ... FOR line IN EXECUTE ''EXPLAIN ANALYZE <statement goes here> LOOP RAISE NOTICE ''% '' , line; END LOOP; -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general