Project

General

Profile

« Previous | Next » 

Revision 14084

schemas/public_.sql: added iucn_red_list_view_modify() and use it in iucn_red_list_view's "after updating this" instructions

View differences:

trunk/schemas/vegbien.my.sql
1395 1395

  
1396 1396

  
1397 1397
--
1398
-- Name: iucn_red_list_view_modify(); Type: FUNCTION; Schema: public; Owner: -
1399
--
1400

  
1401

  
1402

  
1403

  
1404
--
1398 1405
-- Name: location__pull_forward_from_parent(); Type: FUNCTION; Schema: public; Owner: -
1399 1406
--
1400 1407

  
trunk/schemas/public_.sql
2252 2252

  
2253 2253

  
2254 2254
--
2255
-- Name: iucn_red_list_view_modify(); Type: FUNCTION; Schema: public; Owner: -
2256
--
2257

  
2258
CREATE FUNCTION iucn_red_list_view_modify() RETURNS void
2259
    LANGUAGE sql
2260
    AS $$
2261
SELECT util.rematerialize_view('iucn_red_list', 'iucn_red_list_view');
2262

  
2263
ALTER TABLE iucn_red_list ADD PRIMARY KEY(accepted_family, accepted_species_binomial);
2264
$$;
2265

  
2266

  
2267
--
2255 2268
-- Name: location__pull_forward_from_parent(); Type: FUNCTION; Schema: public; Owner: -
2256 2269
--
2257 2270

  
......
9636 9649

  
9637 9650
COMMENT ON VIEW iucn_red_list_view IS '
9638 9651
after updating this:
9639
SELECT util.rematerialize_view(''iucn_red_list'', ''iucn_red_list_view'');
9640
ALTER TABLE iucn_red_list ADD PRIMARY KEY(accepted_family, accepted_species_binomial);
9652
SELECT iucn_red_list_view_modify();
9641 9653
';
9642 9654

  
9643 9655

  
trunk/schemas/vegbien.sql
2252 2252

  
2253 2253

  
2254 2254
--
2255
-- Name: iucn_red_list_view_modify(); Type: FUNCTION; Schema: public; Owner: -
2256
--
2257

  
2258
CREATE FUNCTION iucn_red_list_view_modify() RETURNS void
2259
    LANGUAGE sql
2260
    AS $$
2261
SELECT util.rematerialize_view('iucn_red_list', 'iucn_red_list_view');
2262

  
2263
ALTER TABLE iucn_red_list ADD PRIMARY KEY(accepted_family, accepted_species_binomial);
2264
$$;
2265

  
2266

  
2267
--
2255 2268
-- Name: location__pull_forward_from_parent(); Type: FUNCTION; Schema: public; Owner: -
2256 2269
--
2257 2270

  
......
9636 9649

  
9637 9650
COMMENT ON VIEW iucn_red_list_view IS '
9638 9651
after updating this:
9639
SELECT util.rematerialize_view(''iucn_red_list'', ''iucn_red_list_view'');
9640
ALTER TABLE iucn_red_list ADD PRIMARY KEY(accepted_family, accepted_species_binomial);
9652
SELECT iucn_red_list_view_modify();
9641 9653
';
9642 9654

  
9643 9655

  

Also available in: Unified diff