Revision 10844
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/vegbien.sql | ||
---|---|---|
6595 | 6595 |
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace: |
6596 | 6596 |
-- |
6597 | 6597 |
|
6598 |
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree (location_id, (COALESCE(authoreventcode, '\N'::text)), (COALESCE(obsstartdate, 'infinity'::date))) WHERE ((parent_id IS NULL) AND (sourceaccessioncode IS NULL));
|
|
6598 |
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree ((COALESCE(location_id, 2147483647)), (COALESCE(authoreventcode, '\N'::text)), (COALESCE(obsstartdate, 'infinity'::date))) WHERE ((parent_id IS NULL) AND (sourceaccessioncode IS NULL));
|
|
6599 | 6599 |
|
6600 | 6600 |
|
6601 | 6601 |
-- |
Also available in: Unified diff
bugfix: schemas/vegbien.sql: locationevent: locationevent_unique_within_location unique index: added COALESCE expression around location_id since it is nullable, and this is needed for the left and right sides of the join to exactly match up to use an index scan