Project

General

Profile

« Previous | Next » 

Revision 4986

schemas/vegbien.sql: taxonoccurrence: taxonoccurrence_unique_within_locationevent unique index: Fixed bug where locationevent_id needed to be enclosed in COALESCE so that the unique constraint also applies to rows with NULL locationevent_ids (there is no other unique constraint handling these rows)

View differences:

vegbien.sql
4721 4721
-- Name: taxonoccurrence_unique_within_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4722 4722
--
4723 4723

  
4724
CREATE UNIQUE INDEX taxonoccurrence_unique_within_locationevent ON taxonoccurrence USING btree (locationevent_id, (COALESCE(authortaxoncode, '\\N'::text))) WHERE (sourceaccessioncode IS NULL);
4724
CREATE UNIQUE INDEX taxonoccurrence_unique_within_locationevent ON taxonoccurrence USING btree ((COALESCE(locationevent_id, 2147483647)), (COALESCE(authortaxoncode, '\\N'::text))) WHERE (sourceaccessioncode IS NULL);
4725 4725

  
4726 4726

  
4727 4727
--

Also available in: Unified diff