Revision 5991
Added by Aaron Marcuse-Kubitza about 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
333 | 333 |
|
334 | 334 |
|
335 | 335 |
-- |
336 |
-- Name: sync_geoscrub_input_to_view(); Type: FUNCTION; Schema: public; Owner: - |
|
337 |
-- |
|
338 |
|
|
339 |
|
|
340 |
|
|
341 |
|
|
342 |
-- |
|
336 | 343 |
-- Name: taxonlabel_0_matched_label_id_self_ref(); Type: FUNCTION; Schema: public; Owner: - |
337 | 344 |
-- |
338 | 345 |
|
... | ... | |
1777 | 1784 |
|
1778 | 1785 |
|
1779 | 1786 |
-- |
1787 |
-- Name: geoscrub_input; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1788 |
-- |
|
1789 |
|
|
1790 |
CREATE TABLE geoscrub_input ( |
|
1791 |
country text, |
|
1792 |
`stateProvince` text, |
|
1793 |
county text, |
|
1794 |
`decimalLatitude` double precision, |
|
1795 |
`decimalLongitude` double precision |
|
1796 |
); |
|
1797 |
|
|
1798 |
|
|
1799 |
-- |
|
1800 |
-- Name: geoscrub_input_view; Type: VIEW; Schema: public; Owner: - |
|
1801 |
-- |
|
1802 |
|
|
1803 |
|
|
1804 |
|
|
1805 |
|
|
1806 |
-- |
|
1780 | 1807 |
-- Name: graphic; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1781 | 1808 |
-- |
1782 | 1809 |
|
schemas/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
schemas/vegbien.sql: Added geoscrub_input derived table with associated view. Build geoscrub_input as part of make_analytical_db().