Search Postgresql Archives
Re: return text from explain
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
To
: Willy-Bas Loos <
willybas@xxxxxxxxx
>
Subject
: Re: return text from explain
From
: Виктор Егоров <
vyegorov@xxxxxxxxx
>
Date
: Fri, 7 Sep 2012 12:00:14 +0300
Cc
:
pgsql-general@xxxxxxxxxxxxxx
In-reply-to
: <
CAHnozTjpWd+xvdo5vtEweNQGJq6ArLCq56C16jmAkC1cqwuBrQ@mail.gmail.com
>
Hope this helps:
CREATE OR REPLACE FUNCTION explain(in_sql text) RETURNS TABLE(explain_line text) AS $explain$
BEGIN
RETURN QUERY EXECUTE 'EXPLAIN '||in_sql;
END;
$explain$ LANGUAGE plpgsql;
SELECT * FROM explain('SELECT * FROM pg_locks');
--
Victor Y. Yegorov
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Follow-Ups
:
Re: return text from explain
From:
Willy-Bas Loos
References
:
return text from explain
From:
Willy-Bas Loos
Re: return text from explain
From:
Bruce Momjian
Re: return text from explain
From:
Tom Lane
Re: return text from explain
From:
Willy-Bas Loos
Prev by Date:
Re: return text from explain
Next by Date:
Re: return text from explain
Previous by thread:
Re: return text from explain
Next by thread:
Re: return text from explain
Index(es):
Date
Thread
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]