Project

General

Profile

« Previous | Next » 

Revision 13569

inputs/.TNRS/schema.sql: added tnrs__batch_begin() trigger to populate the match_num (match sort order)

View differences:

trunk/schemas/vegbien.my.sql
13227 13227

  
13228 13228

  
13229 13229
--
13230
-- Name: tnrs__batch_begin(); Type: FUNCTION; Schema: TNRS; Owner: -
13231
--
13232

  
13233

  
13234

  
13235

  
13236
--
13230 13237
-- Name: tnrs_populate_fields(); Type: FUNCTION; Schema: TNRS; Owner: -
13231 13238
--
13232 13239

  
......
13598 13605

  
13599 13606

  
13600 13607
--
13608
-- Name: tnrs__batch_begin; Type: TRIGGER; Schema: TNRS; Owner: -
13609
--
13610

  
13611

  
13612

  
13613

  
13614
--
13601 13615
-- Name: tnrs_populate_fields; Type: TRIGGER; Schema: TNRS; Owner: -
13602 13616
--
13603 13617

  
trunk/schemas/vegbien.sql
16953 16953

  
16954 16954

  
16955 16955
--
16956
-- Name: tnrs__batch_begin(); Type: FUNCTION; Schema: TNRS; Owner: -
16957
--
16958

  
16959
CREATE FUNCTION tnrs__batch_begin() RETURNS trigger
16960
    LANGUAGE plpgsql
16961
    AS $$
16962
BEGIN
16963
	PERFORM util.seq__reset('pg_temp.tnrs__match_num__seq', 0);
16964
	RETURN NULL;
16965
END;
16966
$$;
16967

  
16968

  
16969
--
16956 16970
-- Name: tnrs_populate_fields(); Type: FUNCTION; Schema: TNRS; Owner: -
16957 16971
--
16958 16972

  
......
17586 17600

  
17587 17601

  
17588 17602
--
17603
-- Name: tnrs__batch_begin; Type: TRIGGER; Schema: TNRS; Owner: -
17604
--
17605

  
17606
CREATE TRIGGER tnrs__batch_begin BEFORE INSERT ON tnrs FOR EACH STATEMENT EXECUTE PROCEDURE tnrs__batch_begin();
17607

  
17608

  
17609
--
17589 17610
-- Name: tnrs_populate_fields; Type: TRIGGER; Schema: TNRS; Owner: -
17590 17611
--
17591 17612

  

Also available in: Unified diff