Thanx!
WBL
On Fri, Sep 7, 2012 at 11:00 AM, Виктор Егоров <vyegorov@xxxxxxxxx> wrote:
Hope this helps:CREATE OR REPLACE FUNCTION explain(in_sql text) RETURNS TABLE(explain_line text) AS $explain$BEGINRETURN QUERY EXECUTE 'EXPLAIN '||in_sql;END;$explain$ LANGUAGE plpgsql;SELECT * FROM explain('SELECT * FROM pg_locks');--
Victor Y. Yegorov
--
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth