Project

General

Profile

« Previous | Next » 

Revision 6668

schemas/vegbien.sql: coordinates: coordinates_unique: Use md5() on verbatimcoordinates so that it doesn't cause the index row size to be exceeded. This should fix a bug in the HIBG import where long verbatimcoordinates values were causing the error 'OperationalError: index row size 2784 exceeds maximum 2712 for index "coordinates_unique"'.

View differences:

vegbien.sql
6015 6015
-- Name: coordinates_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
6016 6016
--
6017 6017

  
6018
CREATE UNIQUE INDEX coordinates_unique ON coordinates USING btree (source_id, latitude_deg, longitude_deg, (COALESCE(verbatimlatitude, '\N'::text)), (COALESCE(verbatimlongitude, '\N'::text)), (COALESCE(verbatimcoordinates, '\N'::text)), (COALESCE(footprintgeometry_dwc, '\N'::text)));
6018
CREATE UNIQUE INDEX coordinates_unique ON coordinates USING btree (source_id, latitude_deg, longitude_deg, (COALESCE(verbatimlatitude, '\N'::text)), (COALESCE(verbatimlongitude, '\N'::text)), (COALESCE(md5(verbatimcoordinates), '\N'::text)), (COALESCE(footprintgeometry_dwc, '\N'::text)));
6019 6019

  
6020 6020

  
6021 6021
--

Also available in: Unified diff