hypopg/expected/hypo_setup.out
Julien Rouhaud 37d6cb56ce Start adding some regression test for hypothetical partitioning.
This will fail on pg10- servers, but since hypothetical partitioning has
some feature not covered by regression tests, a full coverage of hypopg for all
pg versions will be done in other commit(s).
2018-07-27 12:39:34 +02:00

16 lines
348 B
Text

-- General setup
-- Create extension
CREATE EXTENSION hypopg;
-- Create do_explain function
CREATE OR REPLACE FUNCTION do_explain(stmt text) RETURNS table(a text) AS
$_$
DECLARE
ret text;
BEGIN
FOR ret IN EXECUTE format('EXPLAIN (FORMAT text) %s', stmt) LOOP
a := ret;
RETURN next ;
END LOOP;
END;
$_$
LANGUAGE plpgsql;