Project

General

Profile

« Previous | Next » 

Revision 13403

bugfix: schemas/util.sql: explain2notice_msg_if_can(): don't use util.is_explainable() because the list provided by Postgres (http://www.postgresql.org/docs/9.3/static/sql-explain.html#AEN77691) excludes some query types that are in fact EXPLAIN-able

View differences:

trunk/schemas/util.sql
1640 1640
--
1641 1641

  
1642 1642
CREATE FUNCTION explain2notice_msg_if_can(sql text) RETURNS text
1643
    LANGUAGE sql
1644
    AS $_$
1645
SELECT (CASE WHEN util.is_explainable($1) THEN util.explain2notice_msg($1) END)
1646
$_$;
1643
    LANGUAGE plpgsql
1644
    AS $$
1645
BEGIN
1646
	RETURN util.explain2notice_msg(sql);
1647
EXCEPTION
1648
WHEN syntax_error THEN RETURN NULL; -- non-explainable query
1649
	/* don't use util.is_explainable() because the list provided by Postgres
1650
	(http://www.postgresql.org/docs/9.3/static/sql-explain.html#AEN77691)
1651
	excludes some query types that are in fact EXPLAIN-able */
1652
END;
1653
$$;
1647 1654

  
1648 1655

  
1649 1656
--

Also available in: Unified diff