Project

General

Profile

« Previous | Next » 

Revision 9828

bugfix: inputs/GBIF/raw_occurrence_record_plants/postprocess.sql: institution_code index: create it idempotently using create_if_not_exists() and an explicit index name, so that a duplicate index doesn't get added each time postprocess.sql is run

View differences:

inputs/GBIF/raw_occurrence_record_plants/postprocess.sql
1 1
SELECT util.search_path_append('util');
2 2

  
3
CREATE INDEX ON :table ("institution_code");
3
SELECT create_if_not_exists($$CREATE INDEX raw_occurrence_record_plants_institution_code ON raw_occurrence_record_plants ("institution_code")$$);
4 4

  
5 5
-- Remove institutions that we have direct data for
6 6
DELETE FROM :table

Also available in: Unified diff