Project

General

Profile

« Previous | Next » 

Revision 13383

schemas/public_.sql: added output_queries(prefix)

View differences:

trunk/schemas/vegbien.my.sql
2630 2630

  
2631 2631

  
2632 2632
--
2633
-- Name: output_queries(varchar(255), anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
2634
--
2635

  
2636

  
2637

  
2638

  
2639
--
2633 2640
-- Name: query_relations(regclass, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
2634 2641
--
2635 2642

  
trunk/schemas/public_.sql
4288 4288

  
4289 4289

  
4290 4290
--
4291
-- Name: output_queries(text, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
4292
--
4293

  
4294
CREATE FUNCTION output_queries(prefix text DEFAULT NULL::text, schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS SETOF regclass
4295
    LANGUAGE plpgsql
4296
    SET search_path TO pg_temp
4297
    AS $$
4298
/* must use LANGUAGE plpgsql because LANGUAGE sql does not support runtime
4299
changes of search_path (schema elements are bound at inline time rather than
4300
runtime) */
4301
/* function option search_path is needed to limit the effects of
4302
`SET LOCAL search_path` to the current function */
4303
BEGIN
4304
	PERFORM util.use_schema(schema_anchor);
4305
	
4306
	RETURN QUERY
4307
	SELECT * FROM validation_views(util.schema(schema_anchor), prefix)
4308
	;
4309
END;
4310
$$;
4311

  
4312

  
4313
--
4291 4314
-- Name: query_relations(regclass, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
4292 4315
--
4293 4316

  
trunk/schemas/vegbien.sql
4288 4288

  
4289 4289

  
4290 4290
--
4291
-- Name: output_queries(text, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
4292
--
4293

  
4294
CREATE FUNCTION output_queries(prefix text DEFAULT NULL::text, schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS SETOF regclass
4295
    LANGUAGE plpgsql
4296
    SET search_path TO pg_temp
4297
    AS $$
4298
/* must use LANGUAGE plpgsql because LANGUAGE sql does not support runtime
4299
changes of search_path (schema elements are bound at inline time rather than
4300
runtime) */
4301
/* function option search_path is needed to limit the effects of
4302
`SET LOCAL search_path` to the current function */
4303
BEGIN
4304
	PERFORM util.use_schema(schema_anchor);
4305
	
4306
	RETURN QUERY
4307
	SELECT * FROM validation_views(util.schema(schema_anchor), prefix)
4308
	;
4309
END;
4310
$$;
4311

  
4312

  
4313
--
4291 4314
-- Name: query_relations(regclass, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
4292 4315
--
4293 4316

  

Also available in: Unified diff