Revision 14351
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/vegbien.my.sql | ||
---|---|---|
1283 | 1283 |
|
1284 | 1284 |
|
1285 | 1285 |
-- |
1286 |
-- Name: analytical_stem_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
1286 |
-- Name: analytical_stem_view_modify(int(1)); Type: FUNCTION; Schema: public; Owner: -
|
|
1287 | 1287 |
-- |
1288 | 1288 |
|
1289 | 1289 |
|
... | ... | |
1353 | 1353 |
|
1354 | 1354 |
|
1355 | 1355 |
-- |
1356 |
-- Name: geoscrub_input_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
1356 |
-- Name: geoscrub_input_view_modify(int(1)); Type: FUNCTION; Schema: public; Owner: -
|
|
1357 | 1357 |
-- |
1358 | 1358 |
|
1359 | 1359 |
|
... | ... | |
1395 | 1395 |
|
1396 | 1396 |
|
1397 | 1397 |
-- |
1398 |
-- Name: iucn_red_list_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
1398 |
-- Name: iucn_red_list_view_modify(int(1)); Type: FUNCTION; Schema: public; Owner: -
|
|
1399 | 1399 |
-- |
1400 | 1400 |
|
1401 | 1401 |
|
... | ... | |
1625 | 1625 |
|
1626 | 1626 |
|
1627 | 1627 |
-- |
1628 |
-- Name: provider_count_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
1628 |
-- Name: provider_count_view_modify(int(1)); Type: FUNCTION; Schema: public; Owner: -
|
|
1629 | 1629 |
-- |
1630 | 1630 |
|
1631 | 1631 |
|
... | ... | |
1716 | 1716 |
|
1717 | 1717 |
|
1718 | 1718 |
-- |
1719 |
-- Name: taxon_trait_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
1719 |
-- Name: taxon_trait_view_modify(int(1)); Type: FUNCTION; Schema: public; Owner: -
|
|
1720 | 1720 |
-- |
1721 | 1721 |
|
1722 | 1722 |
|
trunk/schemas/public_.sql | ||
---|---|---|
1982 | 1982 |
|
1983 | 1983 |
|
1984 | 1984 |
-- |
1985 |
-- Name: analytical_stem_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
1985 |
-- Name: analytical_stem_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
1986 | 1986 |
-- |
1987 | 1987 |
|
1988 |
CREATE FUNCTION analytical_stem_view_modify() RETURNS void |
|
1988 |
CREATE FUNCTION analytical_stem_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
1989 | 1989 |
LANGUAGE sql |
1990 | 1990 |
AS $_$ |
1991 | 1991 |
SELECT util.rematerialize_view('analytical_stem', 'analytical_stem_view', $$ |
... | ... | |
2002 | 2002 |
CREATE INDEX ON analytical_stem ("datasource__@Brad__.identifier_examples@vegpath.org", "[custodial_]institutionCode[s]__@DwC__@vegpath.org", "collectionCode__@DwC__@vegpath.org", "catalogNumber__@DwC__@vegpath.org"); |
2003 | 2003 |
CREATE INDEX ON analytical_stem ("datasource__@Brad__.identifier_examples@vegpath.org", "projectID__@VegX__.plotObservation@vegpath.org", "locationID__@DwC__@vegpath.org", "eventDate__@DwC__@vegpath.org"); |
2004 | 2004 |
CREATE INDEX ON analytical_stem ("speciesBinomialWithMorphospecies__@VegCore__@vegpath.org"); |
2005 |
$$); |
|
2005 |
$$, repopulate);
|
|
2006 | 2006 |
$_$; |
2007 | 2007 |
|
2008 | 2008 |
|
... | ... | |
2166 | 2166 |
|
2167 | 2167 |
|
2168 | 2168 |
-- |
2169 |
-- Name: geoscrub_input_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
2169 |
-- Name: geoscrub_input_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
2170 | 2170 |
-- |
2171 | 2171 |
|
2172 |
CREATE FUNCTION geoscrub_input_view_modify() RETURNS void |
|
2172 |
CREATE FUNCTION geoscrub_input_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
2173 | 2173 |
LANGUAGE sql |
2174 | 2174 |
AS $_$ |
2175 | 2175 |
SELECT util.rematerialize_view('geoscrub_input', 'geoscrub_input_view', $$ |
2176 | 2176 |
GRANT SELECT ON TABLE geoscrub_input TO bien_read; |
2177 | 2177 |
GRANT SELECT ON TABLE geoscrub_input_view TO bien_read; |
2178 |
$$); |
|
2178 |
$$, repopulate);
|
|
2179 | 2179 |
$_$; |
2180 | 2180 |
|
2181 | 2181 |
|
... | ... | |
2250 | 2250 |
|
2251 | 2251 |
|
2252 | 2252 |
-- |
2253 |
-- Name: iucn_red_list_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
2253 |
-- Name: iucn_red_list_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
2254 | 2254 |
-- |
2255 | 2255 |
|
2256 |
CREATE FUNCTION iucn_red_list_view_modify() RETURNS void |
|
2256 |
CREATE FUNCTION iucn_red_list_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
2257 | 2257 |
LANGUAGE sql |
2258 | 2258 |
AS $_$ |
2259 | 2259 |
SELECT util.rematerialize_view('iucn_red_list', 'iucn_red_list_view', $$ |
2260 | 2260 |
ALTER TABLE iucn_red_list ADD PRIMARY KEY(accepted_family, accepted_species_binomial); |
2261 |
$$); |
|
2261 |
$$, repopulate);
|
|
2262 | 2262 |
$_$; |
2263 | 2263 |
|
2264 | 2264 |
|
... | ... | |
2806 | 2806 |
|
2807 | 2807 |
|
2808 | 2808 |
-- |
2809 |
-- Name: provider_count_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
2809 |
-- Name: provider_count_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
2810 | 2810 |
-- |
2811 | 2811 |
|
2812 |
CREATE FUNCTION provider_count_view_modify() RETURNS void |
|
2812 |
CREATE FUNCTION provider_count_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
2813 | 2813 |
LANGUAGE sql |
2814 | 2814 |
AS $_$ |
2815 | 2815 |
SELECT util.rematerialize_view('provider_count', 'provider_count_view', $$ |
... | ... | |
2819 | 2819 |
GRANT SELECT ON TABLE provider_count_view TO public_; |
2820 | 2820 |
|
2821 | 2821 |
ALTER TABLE provider_count ADD PRIMARY KEY (dataprovider, dataset); |
2822 |
$$); |
|
2822 |
$$, repopulate);
|
|
2823 | 2823 |
$_$; |
2824 | 2824 |
|
2825 | 2825 |
|
... | ... | |
3031 | 3031 |
|
3032 | 3032 |
|
3033 | 3033 |
-- |
3034 |
-- Name: taxon_trait_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
3034 |
-- Name: taxon_trait_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
3035 | 3035 |
-- |
3036 | 3036 |
|
3037 |
CREATE FUNCTION taxon_trait_view_modify() RETURNS void |
|
3037 |
CREATE FUNCTION taxon_trait_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
3038 | 3038 |
LANGUAGE sql |
3039 | 3039 |
AS $_$ |
3040 | 3040 |
SELECT util.rematerialize_view('taxon_trait', 'taxon_trait_view', $$ |
... | ... | |
3045 | 3045 |
ALTER TABLE taxon_trait ALTER COLUMN "measurementType" SET NOT NULL; |
3046 | 3046 |
|
3047 | 3047 |
CREATE INDEX ON taxon_trait ("scientificName", "measurementType" ); |
3048 |
$$); |
|
3048 |
$$, repopulate);
|
|
3049 | 3049 |
$_$; |
3050 | 3050 |
|
3051 | 3051 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
1982 | 1982 |
|
1983 | 1983 |
|
1984 | 1984 |
-- |
1985 |
-- Name: analytical_stem_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
1985 |
-- Name: analytical_stem_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
1986 | 1986 |
-- |
1987 | 1987 |
|
1988 |
CREATE FUNCTION analytical_stem_view_modify() RETURNS void |
|
1988 |
CREATE FUNCTION analytical_stem_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
1989 | 1989 |
LANGUAGE sql |
1990 | 1990 |
AS $_$ |
1991 | 1991 |
SELECT util.rematerialize_view('analytical_stem', 'analytical_stem_view', $$ |
... | ... | |
2002 | 2002 |
CREATE INDEX ON analytical_stem ("datasource__@Brad__.identifier_examples@vegpath.org", "[custodial_]institutionCode[s]__@DwC__@vegpath.org", "collectionCode__@DwC__@vegpath.org", "catalogNumber__@DwC__@vegpath.org"); |
2003 | 2003 |
CREATE INDEX ON analytical_stem ("datasource__@Brad__.identifier_examples@vegpath.org", "projectID__@VegX__.plotObservation@vegpath.org", "locationID__@DwC__@vegpath.org", "eventDate__@DwC__@vegpath.org"); |
2004 | 2004 |
CREATE INDEX ON analytical_stem ("speciesBinomialWithMorphospecies__@VegCore__@vegpath.org"); |
2005 |
$$); |
|
2005 |
$$, repopulate);
|
|
2006 | 2006 |
$_$; |
2007 | 2007 |
|
2008 | 2008 |
|
... | ... | |
2166 | 2166 |
|
2167 | 2167 |
|
2168 | 2168 |
-- |
2169 |
-- Name: geoscrub_input_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
2169 |
-- Name: geoscrub_input_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
2170 | 2170 |
-- |
2171 | 2171 |
|
2172 |
CREATE FUNCTION geoscrub_input_view_modify() RETURNS void |
|
2172 |
CREATE FUNCTION geoscrub_input_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
2173 | 2173 |
LANGUAGE sql |
2174 | 2174 |
AS $_$ |
2175 | 2175 |
SELECT util.rematerialize_view('geoscrub_input', 'geoscrub_input_view', $$ |
2176 | 2176 |
GRANT SELECT ON TABLE geoscrub_input TO bien_read; |
2177 | 2177 |
GRANT SELECT ON TABLE geoscrub_input_view TO bien_read; |
2178 |
$$); |
|
2178 |
$$, repopulate);
|
|
2179 | 2179 |
$_$; |
2180 | 2180 |
|
2181 | 2181 |
|
... | ... | |
2250 | 2250 |
|
2251 | 2251 |
|
2252 | 2252 |
-- |
2253 |
-- Name: iucn_red_list_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
2253 |
-- Name: iucn_red_list_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
2254 | 2254 |
-- |
2255 | 2255 |
|
2256 |
CREATE FUNCTION iucn_red_list_view_modify() RETURNS void |
|
2256 |
CREATE FUNCTION iucn_red_list_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
2257 | 2257 |
LANGUAGE sql |
2258 | 2258 |
AS $_$ |
2259 | 2259 |
SELECT util.rematerialize_view('iucn_red_list', 'iucn_red_list_view', $$ |
2260 | 2260 |
ALTER TABLE iucn_red_list ADD PRIMARY KEY(accepted_family, accepted_species_binomial); |
2261 |
$$); |
|
2261 |
$$, repopulate);
|
|
2262 | 2262 |
$_$; |
2263 | 2263 |
|
2264 | 2264 |
|
... | ... | |
2806 | 2806 |
|
2807 | 2807 |
|
2808 | 2808 |
-- |
2809 |
-- Name: provider_count_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
2809 |
-- Name: provider_count_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
2810 | 2810 |
-- |
2811 | 2811 |
|
2812 |
CREATE FUNCTION provider_count_view_modify() RETURNS void |
|
2812 |
CREATE FUNCTION provider_count_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
2813 | 2813 |
LANGUAGE sql |
2814 | 2814 |
AS $_$ |
2815 | 2815 |
SELECT util.rematerialize_view('provider_count', 'provider_count_view', $$ |
... | ... | |
2819 | 2819 |
GRANT SELECT ON TABLE provider_count_view TO public_; |
2820 | 2820 |
|
2821 | 2821 |
ALTER TABLE provider_count ADD PRIMARY KEY (dataprovider, dataset); |
2822 |
$$); |
|
2822 |
$$, repopulate);
|
|
2823 | 2823 |
$_$; |
2824 | 2824 |
|
2825 | 2825 |
|
... | ... | |
3031 | 3031 |
|
3032 | 3032 |
|
3033 | 3033 |
-- |
3034 |
-- Name: taxon_trait_view_modify(); Type: FUNCTION; Schema: public; Owner: - |
|
3034 |
-- Name: taxon_trait_view_modify(boolean); Type: FUNCTION; Schema: public; Owner: -
|
|
3035 | 3035 |
-- |
3036 | 3036 |
|
3037 |
CREATE FUNCTION taxon_trait_view_modify() RETURNS void |
|
3037 |
CREATE FUNCTION taxon_trait_view_modify(repopulate boolean DEFAULT true) RETURNS void
|
|
3038 | 3038 |
LANGUAGE sql |
3039 | 3039 |
AS $_$ |
3040 | 3040 |
SELECT util.rematerialize_view('taxon_trait', 'taxon_trait_view', $$ |
... | ... | |
3045 | 3045 |
ALTER TABLE taxon_trait ALTER COLUMN "measurementType" SET NOT NULL; |
3046 | 3046 |
|
3047 | 3047 |
CREATE INDEX ON taxon_trait ("scientificName", "measurementType" ); |
3048 |
$$); |
|
3048 |
$$, repopulate);
|
|
3049 | 3049 |
$_$; |
3050 | 3050 |
|
3051 | 3051 |
|
Also available in: Unified diff
schemas/public_.sql: *_view_modify(): added repopulate param, which is passed to rematerialize_view()