Revision 14424
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/inputs/.TNRS/schema.sql | ||
---|---|---|
1909 | 1909 |
|
1910 | 1910 |
|
1911 | 1911 |
-- |
1912 |
-- Name: taxon_scrub.scrubbed_unique_taxon_name.*; Type: VIEW; Schema: TNRS; Owner: - |
|
1913 |
-- |
|
1914 |
|
|
1915 |
CREATE VIEW "taxon_scrub.scrubbed_unique_taxon_name.*" AS |
|
1916 |
SELECT taxon_match."*Name_submitted" AS scrubbed_unique_taxon_name, |
|
1917 |
taxon_match."*Name_matched_rank" AS scrubbed_taxon_rank, |
|
1918 |
COALESCE(taxon_match."*Name_matched_accepted_family", taxon_match."*Family_matched") AS scrubbed_family, |
|
1919 |
taxon_match."*Genus_matched" AS scrubbed_genus, |
|
1920 |
taxon_match."*Specific_epithet_matched" AS scrubbed_specific_epithet, |
|
1921 |
taxon_match."*Infraspecific_rank" AS scrubbed_infraspecific_rank, |
|
1922 |
taxon_match."*Infraspecific_epithet_matched" AS scrubbed_infraspecific_epithet, |
|
1923 |
taxon_match."*Name_matched_author" AS scrubbed_author, |
|
1924 |
taxon_match."*Name_matched" AS scrubbed_taxon_name_no_author, |
|
1925 |
(taxon_match."*Name_matched" || COALESCE((' '::text || taxon_match."*Name_matched_author"), ''::text)) AS scrubbed_taxon_name_with_author |
|
1926 |
FROM taxon_match; |
|
1927 |
|
|
1928 |
|
|
1929 |
-- |
|
1930 |
-- Name: VIEW "taxon_scrub.scrubbed_unique_taxon_name.*"; Type: COMMENT; Schema: TNRS; Owner: - |
|
1931 |
-- |
|
1932 |
|
|
1933 |
COMMENT ON VIEW "taxon_scrub.scrubbed_unique_taxon_name.*" IS ' |
|
1934 |
to modify: |
|
1935 |
SELECT util.recreate_view(''"TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*"'', $$ |
|
1936 |
SELECT __ |
|
1937 |
$$); |
|
1938 |
|
|
1939 |
scrubbed_family: Name_matched_accepted_family was missing from the TNRS results at one point, so Family_matched is used as a workaround to populate this. the workaround is for *accepted names only*, as no opinion names do not have an Accepted_name_family to prepend to the scrubbed name to parse. |
|
1940 |
'; |
|
1941 |
|
|
1942 |
|
|
1943 |
-- |
|
1944 | 1912 |
-- Name: batch_download_settings_pkey; Type: CONSTRAINT; Schema: TNRS; Owner: -; Tablespace: |
1945 | 1913 |
-- |
1946 | 1914 |
|
... | ... | |
2147 | 2115 |
|
2148 | 2116 |
|
2149 | 2117 |
-- |
2150 |
-- Name: taxon_scrub.scrubbed_unique_taxon_name.*; Type: ACL; Schema: TNRS; Owner: - |
|
2151 |
-- |
|
2152 |
|
|
2153 |
REVOKE ALL ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" FROM PUBLIC; |
|
2154 |
REVOKE ALL ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" FROM bien; |
|
2155 |
GRANT ALL ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" TO bien; |
|
2156 |
GRANT SELECT ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" TO bien_read; |
|
2157 |
|
|
2158 |
|
|
2159 |
-- |
|
2160 | 2118 |
-- PostgreSQL database dump complete |
2161 | 2119 |
-- |
2162 | 2120 |
|
trunk/schemas/vegbien.my.sql | ||
---|---|---|
16475 | 16475 |
|
16476 | 16476 |
|
16477 | 16477 |
|
16478 |
-- |
|
16479 |
-- Name: taxon_scrub.scrubbed_unique_taxon_name.*; Type: VIEW; Schema: TNRS; Owner: - |
|
16480 |
-- |
|
16481 |
|
|
16482 |
|
|
16483 |
|
|
16484 |
|
|
16485 |
-- |
|
16486 |
-- Name: VIEW `taxon_scrub.scrubbed_unique_taxon_name.*`; Type: COMMENT; Schema: TNRS; Owner: - |
|
16487 |
-- |
|
16488 |
|
|
16489 |
|
|
16490 |
|
|
16491 |
|
|
16492 | 16478 |
USE geoscrub; |
16493 | 16479 |
|
16494 | 16480 |
-- |
... | ... | |
16771 | 16757 |
|
16772 | 16758 |
|
16773 | 16759 |
-- |
16774 |
-- Name: taxon_scrub.scrubbed_unique_taxon_name.*; Type: ACL; Schema: TNRS; Owner: - |
|
16775 |
-- |
|
16776 |
|
|
16777 |
|
|
16778 |
|
|
16779 |
|
|
16780 |
|
|
16781 |
|
|
16782 |
|
|
16783 |
-- |
|
16784 | 16760 |
-- PostgreSQL database dump complete |
16785 | 16761 |
-- |
16786 | 16762 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
21830 | 21830 |
'; |
21831 | 21831 |
|
21832 | 21832 |
|
21833 |
-- |
|
21834 |
-- Name: taxon_scrub.scrubbed_unique_taxon_name.*; Type: VIEW; Schema: TNRS; Owner: - |
|
21835 |
-- |
|
21836 |
|
|
21837 |
CREATE VIEW "taxon_scrub.scrubbed_unique_taxon_name.*" AS |
|
21838 |
SELECT taxon_match."*Name_submitted" AS scrubbed_unique_taxon_name, |
|
21839 |
taxon_match."*Name_matched_rank" AS scrubbed_taxon_rank, |
|
21840 |
COALESCE(taxon_match."*Name_matched_accepted_family", taxon_match."*Family_matched") AS scrubbed_family, |
|
21841 |
taxon_match."*Genus_matched" AS scrubbed_genus, |
|
21842 |
taxon_match."*Specific_epithet_matched" AS scrubbed_specific_epithet, |
|
21843 |
taxon_match."*Infraspecific_rank" AS scrubbed_infraspecific_rank, |
|
21844 |
taxon_match."*Infraspecific_epithet_matched" AS scrubbed_infraspecific_epithet, |
|
21845 |
taxon_match."*Name_matched_author" AS scrubbed_author, |
|
21846 |
taxon_match."*Name_matched" AS scrubbed_taxon_name_no_author, |
|
21847 |
(taxon_match."*Name_matched" || COALESCE((' '::text || taxon_match."*Name_matched_author"), ''::text)) AS scrubbed_taxon_name_with_author |
|
21848 |
FROM taxon_match; |
|
21849 |
|
|
21850 |
|
|
21851 |
-- |
|
21852 |
-- Name: VIEW "taxon_scrub.scrubbed_unique_taxon_name.*"; Type: COMMENT; Schema: TNRS; Owner: - |
|
21853 |
-- |
|
21854 |
|
|
21855 |
COMMENT ON VIEW "taxon_scrub.scrubbed_unique_taxon_name.*" IS ' |
|
21856 |
to modify: |
|
21857 |
SELECT util.recreate_view(''"TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*"'', $$ |
|
21858 |
SELECT __ |
|
21859 |
$$); |
|
21860 |
|
|
21861 |
scrubbed_family: Name_matched_accepted_family was missing from the TNRS results at one point, so Family_matched is used as a workaround to populate this. the workaround is for *accepted names only*, as no opinion names do not have an Accepted_name_family to prepend to the scrubbed name to parse. |
|
21862 |
'; |
|
21863 |
|
|
21864 |
|
|
21865 | 21833 |
SET search_path = geoscrub, pg_catalog; |
21866 | 21834 |
|
21867 | 21835 |
-- |
... | ... | |
22146 | 22114 |
|
22147 | 22115 |
|
22148 | 22116 |
-- |
22149 |
-- Name: taxon_scrub.scrubbed_unique_taxon_name.*; Type: ACL; Schema: TNRS; Owner: - |
|
22150 |
-- |
|
22151 |
|
|
22152 |
REVOKE ALL ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" FROM PUBLIC; |
|
22153 |
REVOKE ALL ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" FROM bien; |
|
22154 |
GRANT ALL ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" TO bien; |
|
22155 |
GRANT SELECT ON TABLE "taxon_scrub.scrubbed_unique_taxon_name.*" TO bien_read; |
|
22156 |
|
|
22157 |
|
|
22158 |
-- |
|
22159 | 22117 |
-- PostgreSQL database dump complete |
22160 | 22118 |
-- |
22161 | 22119 |
|
Also available in: Unified diff
inputs/.TNRS/schema.sql: removed no longer used taxon_scrub.scrubbed_unique_taxon_name.* . use taxon_scrub instead.