Project

General

Profile

« Previous | Next » 

Revision 13141

bugfix: schemas/vegbien.sql: rm_output_queries(): need to include relations whose names were truncated, as well

View differences:

trunk/schemas/vegbien.my.sql
2654 2654

  
2655 2655

  
2656 2656
--
2657
-- Name: rm_output_queries(varchar(255), anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
2657
-- Name: rm_output_queries(varchar(255), int(11), anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
2658 2658
--
2659 2659

  
2660 2660

  
2661 2661

  
2662 2662

  
2663 2663
--
2664
-- Name: FUNCTION rm_output_queries(prefix varchar(255), schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: -
2664
-- Name: FUNCTION rm_output_queries(prefix varchar(255), max_prefix_len int(11), schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: -
2665 2665
--
2666 2666

  
2667 2667

  
trunk/schemas/vegbien.sql
4508 4508

  
4509 4509

  
4510 4510
--
4511
-- Name: rm_output_queries(text, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
4511
-- Name: rm_output_queries(text, integer, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
4512 4512
--
4513 4513

  
4514
CREATE FUNCTION rm_output_queries(prefix text DEFAULT NULL::text, schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS void
4514
CREATE FUNCTION rm_output_queries(prefix text DEFAULT NULL::text, max_prefix_len integer DEFAULT query_view_relation_max_prefix_len(), schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS void
4515 4515
    LANGUAGE sql
4516 4516
    AS $_$
4517 4517
SELECT util.drop_relations_like('^(?:\w*~type\.)?'||
4518
COALESCE(util.regexp_quote($1), '_[[:alpha:]]+_'),
4519
$2, force := true/*needed because some query-view-relations depend on others*/)
4518
COALESCE(util.regexp_quote(util.truncated_prefixed_name_regexp($1, $2)),
4519
	'_[[:alpha:]]+_'),
4520
$3, force := true/*needed because some query-view-relations depend on others*/)
4520 4521
$_$;
4521 4522

  
4522 4523

  
4523 4524
--
4524
-- Name: FUNCTION rm_output_queries(prefix text, schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: -
4525
-- Name: FUNCTION rm_output_queries(prefix text, max_prefix_len integer, schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: -
4525 4526
--
4526 4527

  
4527
COMMENT ON FUNCTION rm_output_queries(prefix text, schema_anchor anyelement) IS '
4528
COMMENT ON FUNCTION rm_output_queries(prefix text, max_prefix_len integer, schema_anchor anyelement) IS '
4528 4529
removes validations *output* queries (in this function''s schema)
4529 4530

  
4530 4531
note that this will cascadingly drop all result tables for those queries as well

Also available in: Unified diff