Project

General

Profile

« Previous | Next » 

Revision 5991

schemas/vegbien.sql: Added geoscrub_input derived table with associated view. Build geoscrub_input as part of make_analytical_db().

View differences:

vegbien.sql
474 474
INSERT INTO analytical_stem SELECT * FROM analytical_stem_view;
475 475
TRUNCATE analytical_aggregate;
476 476
INSERT INTO analytical_aggregate SELECT * FROM analytical_aggregate_view;
477
TRUNCATE geoscrub_input;
478
INSERT INTO geoscrub_input SELECT * FROM geoscrub_input_view;
477 479
$$;
478 480

  
479 481

  
......
724 726

  
725 727

  
726 728
--
729
-- Name: sync_geoscrub_input_to_view(); Type: FUNCTION; Schema: public; Owner: -
730
--
731

  
732
CREATE FUNCTION sync_geoscrub_input_to_view() RETURNS void
733
    LANGUAGE sql
734
    AS $$
735
DROP TABLE IF EXISTS geoscrub_input;
736
CREATE TABLE geoscrub_input AS SELECT * FROM geoscrub_input_view;
737
$$;
738

  
739

  
740
--
727 741
-- Name: taxonlabel_0_matched_label_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
728 742
--
729 743

  
......
2466 2480

  
2467 2481

  
2468 2482
--
2483
-- Name: geoscrub_input; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2484
--
2485

  
2486
CREATE TABLE geoscrub_input (
2487
    country text,
2488
    "stateProvince" text,
2489
    county text,
2490
    "decimalLatitude" double precision,
2491
    "decimalLongitude" double precision
2492
);
2493

  
2494

  
2495
--
2496
-- Name: geoscrub_input_view; Type: VIEW; Schema: public; Owner: -
2497
--
2498

  
2499
CREATE VIEW geoscrub_input_view AS
2500
    SELECT DISTINCT analytical_aggregate.country, analytical_aggregate."stateProvince", analytical_aggregate.county, analytical_aggregate."decimalLatitude", analytical_aggregate."decimalLongitude" FROM analytical_aggregate;
2501

  
2502

  
2503
--
2469 2504
-- Name: graphic; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2470 2505
--
2471 2506

  

Also available in: Unified diff