Обсуждение: getting EXPLAIN output from inside a function

Поиск
Список
Период
Сортировка

getting EXPLAIN output from inside a function

От
Joseph S
Дата:
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;