Revision 13501
Added by Aaron Marcuse-Kubitza over 10 years ago
vegbien.sql | ||
---|---|---|
17104 | 17104 |
-- |
17105 | 17105 |
|
17106 | 17106 |
COMMENT ON VIEW "MatchedTaxon" IS ' |
17107 |
to update, use `*, ... AS accepted_morphospecies_binomial` as the column list |
|
17107 |
to modify: |
|
17108 |
-- use `*, ... AS accepted_morphospecies_binomial` as the column list |
|
17109 |
SELECT util.force_recreate($$ |
|
17110 |
-- trigger the dependent_objects_still_exist exception |
|
17111 |
DROP VIEW "TNRS"."MatchedTaxon"; -- *not* CASCADE; it must trigger an exception |
|
17112 |
|
|
17113 |
CREATE VIEW "TNRS"."MatchedTaxon" AS |
|
17114 |
SELECT *, ... AS accepted_morphospecies_binomial |
|
17115 |
/*revised def*/ |
|
17116 |
; |
|
17117 |
GRANT SELECT ON TABLE "TNRS"."MatchedTaxon" TO bien_read; |
|
17118 |
COMMENT ON VIEW "TNRS"."MatchedTaxon" |
|
17119 |
IS '' |
|
17120 |
... |
|
17121 |
''; |
|
17122 |
|
|
17123 |
-- manually restore views that need to be updated for the changes |
|
17124 |
-- **IMPORTANT**: update these as described in the views'' comments |
|
17125 |
|
|
17126 |
CREATE VIEW "TNRS"."ValidMatchedTaxon" AS |
|
17127 |
SELECT * |
|
17128 |
FROM "TNRS"."MatchedTaxon" |
|
17129 |
WHERE "MatchedTaxon".taxon_scrub__is_valid_match; |
|
17130 |
GRANT SELECT ON TABLE "TNRS"."ValidMatchedTaxon" TO bien_read; |
|
17131 |
COMMENT ON VIEW "TNRS"."ValidMatchedTaxon" |
|
17132 |
IS '' |
|
17133 |
to update, use * as the column list |
|
17134 |
''; |
|
17135 |
|
|
17136 |
CREATE VIEW "TNRS".taxon_scrub AS |
|
17137 |
SELECT * |
|
17138 |
FROM "TNRS"."ValidMatchedTaxon" |
|
17139 |
LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" USING (scrubbed_unique_taxon_name); |
|
17140 |
GRANT SELECT ON TABLE "TNRS".taxon_scrub TO bien_read; |
|
17141 |
COMMENT ON VIEW "TNRS".taxon_scrub |
|
17142 |
IS '' |
|
17143 |
to update, use * as the column list |
|
17144 |
''; |
|
17145 |
$$); |
|
17108 | 17146 |
'; |
17109 | 17147 |
|
17110 | 17148 |
|
Also available in: Unified diff
inputs/.TNRS/schema.sql: MatchedTaxon: documented how to modify it (using util.force_recreate())