Project

General

Profile

« Previous | Next » 

Revision 12458

schemas/util.sql: eval2set(): make debug-printing optional, for use with internal statements

View differences:

trunk/schemas/util.sql
1332 1332

  
1333 1333

  
1334 1334
--
1335
-- Name: eval2set(text, anyelement); Type: FUNCTION; Schema: util; Owner: -
1335
-- Name: eval2set(text, anyelement, boolean); Type: FUNCTION; Schema: util; Owner: -
1336 1336
--
1337 1337

  
1338
CREATE FUNCTION eval2set(sql text, ret_type_null anyelement DEFAULT NULL::text) RETURNS SETOF anyelement
1338
CREATE FUNCTION eval2set(sql text, ret_type_null anyelement DEFAULT NULL::text, verbose_ boolean DEFAULT true) RETURNS SETOF anyelement
1339 1339
    LANGUAGE plpgsql
1340 1340
    AS $$
1341 1341
BEGIN
1342
	PERFORM util.debug_print_sql(sql);
1342
	IF verbose_ THEN PERFORM util.debug_print_sql(sql); END IF;
1343 1343
	RETURN QUERY EXECUTE sql;
1344 1344
END;
1345 1345
$$;
1346 1346

  
1347 1347

  
1348 1348
--
1349
-- Name: FUNCTION eval2set(sql text, ret_type_null anyelement); Type: COMMENT; Schema: util; Owner: -
1350
--
1351

  
1352
COMMENT ON FUNCTION eval2set(sql text, ret_type_null anyelement) IS '
1353
ret_type_null: NULL::ret_type
1354
';
1355

  
1356

  
1357
--
1358 1349
-- Name: eval2val(text, anyelement); Type: FUNCTION; Schema: util; Owner: -
1359 1350
--
1360 1351

  

Also available in: Unified diff