Revision 14513
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/vegbien.my.sql | ||
---|---|---|
7395 | 7395 |
|
7396 | 7396 |
|
7397 | 7397 |
-- |
7398 |
-- Name: native_status_resolver; Type: VIEW; Schema: public; Owner: - |
|
7399 |
-- |
|
7400 |
|
|
7401 |
|
|
7402 |
|
|
7403 |
|
|
7404 |
-- |
|
7398 | 7405 |
-- Name: note; Type: TABLE; Schema: public; Owner: -; Tablespace: |
7399 | 7406 |
-- |
7400 | 7407 |
|
... | ... | |
15561 | 15568 |
|
15562 | 15569 |
|
15563 | 15570 |
-- |
15571 |
-- Name: native_status_resolver; Type: ACL; Schema: public; Owner: - |
|
15572 |
-- |
|
15573 |
|
|
15574 |
|
|
15575 |
|
|
15576 |
|
|
15577 |
|
|
15578 |
|
|
15579 |
|
|
15580 |
-- |
|
15564 | 15581 |
-- Name: note; Type: ACL; Schema: public; Owner: - |
15565 | 15582 |
-- |
15566 | 15583 |
|
trunk/schemas/public_.sql | ||
---|---|---|
10640 | 10640 |
|
10641 | 10641 |
|
10642 | 10642 |
-- |
10643 |
-- Name: native_status_resolver; Type: VIEW; Schema: public; Owner: - |
|
10644 |
-- |
|
10645 |
|
|
10646 |
CREATE VIEW native_status_resolver AS |
|
10647 |
SELECT DISTINCT view_full_occurrence_individual.taxonobservation_id AS id, |
|
10648 |
view_full_occurrence_individual.scrubbed_family AS family, |
|
10649 |
view_full_occurrence_individual.scrubbed_genus AS genus, |
|
10650 |
view_full_occurrence_individual.scrubbed_species_binomial AS species_binomial, |
|
10651 |
view_full_occurrence_individual.country, |
|
10652 |
view_full_occurrence_individual.state_province AS "stateProvince", |
|
10653 |
view_full_occurrence_individual.county |
|
10654 |
FROM view_full_occurrence_individual |
|
10655 |
WHERE ((COALESCE((view_full_occurrence_individual.is_geovalid)::boolean, true) AND (COALESCE((view_full_occurrence_individual.is_new_world)::boolean, false) OR in_new_world(view_full_occurrence_individual.latitude, view_full_occurrence_individual.longitude))) AND (view_full_occurrence_individual.scrubbed_species_binomial IS NOT NULL)); |
|
10656 |
|
|
10657 |
|
|
10658 |
-- |
|
10643 | 10659 |
-- Name: note; Type: TABLE; Schema: public; Owner: -; Tablespace: |
10644 | 10660 |
-- |
10645 | 10661 |
|
... | ... | |
20037 | 20053 |
|
20038 | 20054 |
|
20039 | 20055 |
-- |
20056 |
-- Name: native_status_resolver; Type: ACL; Schema: public; Owner: - |
|
20057 |
-- |
|
20058 |
|
|
20059 |
REVOKE ALL ON TABLE native_status_resolver FROM PUBLIC; |
|
20060 |
REVOKE ALL ON TABLE native_status_resolver FROM bien; |
|
20061 |
GRANT ALL ON TABLE native_status_resolver TO bien; |
|
20062 |
GRANT SELECT ON TABLE native_status_resolver TO bien_read; |
|
20063 |
|
|
20064 |
|
|
20065 |
-- |
|
20040 | 20066 |
-- Name: note; Type: ACL; Schema: public; Owner: - |
20041 | 20067 |
-- |
20042 | 20068 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
10640 | 10640 |
|
10641 | 10641 |
|
10642 | 10642 |
-- |
10643 |
-- Name: native_status_resolver; Type: VIEW; Schema: public; Owner: - |
|
10644 |
-- |
|
10645 |
|
|
10646 |
CREATE VIEW native_status_resolver AS |
|
10647 |
SELECT DISTINCT view_full_occurrence_individual.taxonobservation_id AS id, |
|
10648 |
view_full_occurrence_individual.scrubbed_family AS family, |
|
10649 |
view_full_occurrence_individual.scrubbed_genus AS genus, |
|
10650 |
view_full_occurrence_individual.scrubbed_species_binomial AS species_binomial, |
|
10651 |
view_full_occurrence_individual.country, |
|
10652 |
view_full_occurrence_individual.state_province AS "stateProvince", |
|
10653 |
view_full_occurrence_individual.county |
|
10654 |
FROM view_full_occurrence_individual |
|
10655 |
WHERE ((COALESCE((view_full_occurrence_individual.is_geovalid)::boolean, true) AND (COALESCE((view_full_occurrence_individual.is_new_world)::boolean, false) OR in_new_world(view_full_occurrence_individual.latitude, view_full_occurrence_individual.longitude))) AND (view_full_occurrence_individual.scrubbed_species_binomial IS NOT NULL)); |
|
10656 |
|
|
10657 |
|
|
10658 |
-- |
|
10643 | 10659 |
-- Name: note; Type: TABLE; Schema: public; Owner: -; Tablespace: |
10644 | 10660 |
-- |
10645 | 10661 |
|
... | ... | |
20037 | 20053 |
|
20038 | 20054 |
|
20039 | 20055 |
-- |
20056 |
-- Name: native_status_resolver; Type: ACL; Schema: public; Owner: - |
|
20057 |
-- |
|
20058 |
|
|
20059 |
REVOKE ALL ON TABLE native_status_resolver FROM PUBLIC; |
|
20060 |
REVOKE ALL ON TABLE native_status_resolver FROM bien; |
|
20061 |
GRANT ALL ON TABLE native_status_resolver TO bien; |
|
20062 |
GRANT SELECT ON TABLE native_status_resolver TO bien_read; |
|
20063 |
|
|
20064 |
|
|
20065 |
-- |
|
20040 | 20066 |
-- Name: note; Type: ACL; Schema: public; Owner: - |
20041 | 20067 |
-- |
20042 | 20068 |
|
Also available in: Unified diff
schemas/public_.sql: added native_status_resolver view, requested by Brad (wiki.vegpath.org/Data_requests)