Revision 14513
Added by Aaron Marcuse-Kubitza over 10 years ago
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 |
|
Also available in: Unified diff
schemas/public_.sql: added native_status_resolver view, requested by Brad (wiki.vegpath.org/Data_requests)