Project

General

Profile

« Previous | Next » 

Revision 12448

schemas/util.sql: explain2notice(): added helper function explain2notice_msg() which can also be used individually

View differences:

trunk/schemas/util.sql
1448 1448

  
1449 1449
CREATE FUNCTION explain2notice(sql text) RETURNS void
1450 1450
    LANGUAGE plpgsql
1451
    AS $_$
1451
    AS $$
1452 1452
BEGIN
1453
	RAISE NOTICE '%', $$EXPLAIN:
1454
$$||util.explain2str(sql);
1453
	RAISE NOTICE '%', util.explain2notice_msg(sql);
1455 1454
END;
1455
$$;
1456

  
1457

  
1458
--
1459
-- Name: explain2notice_msg(text); Type: FUNCTION; Schema: util; Owner: -
1460
--
1461

  
1462
CREATE FUNCTION explain2notice_msg(sql text) RETURNS text
1463
    LANGUAGE sql
1464
    AS $_$
1465
SELECT $$EXPLAIN:
1466
$$||util.explain2str($1)
1456 1467
$_$;
1457 1468

  
1458 1469

  

Also available in: Unified diff