From 5d5a371ad1fdcd019945f294e3e6b4da40f20007 Mon Sep 17 00:00:00 2001 From: Stevan Earl Date: Thu, 13 Aug 2026 10:49:30 -0700 Subject: [PATCH] Correct malformed trigger key labels --- db/schemas/lib/triggers/create/aggressions.m4 | 4 ++-- db/schemas/lib/triggers/create/arrivals.m4 | 22 +++++++++---------- db/schemas/lib/triggers/create/arrivals_a.m4 | 6 ++--- .../lib/triggers/create/biography_log.m4 | 2 +- .../lib/triggers/create/brecord_notes.m4 | 2 +- db/schemas/lib/triggers/create/colobus.m4 | 2 +- .../lib/triggers/create/comm_memb_log.m4 | 2 +- db/schemas/lib/triggers/create/food_events.m4 | 6 ++--- .../lib/triggers/create/groom_scans_b.m4 | 4 ++-- db/schemas/lib/triggers/create/groomings.m4 | 6 ++--- db/schemas/lib/triggers/create/humans.m4 | 4 ++-- db/schemas/lib/triggers/create/matings.m4 | 4 ++-- db/schemas/lib/triggers/create/pantgrunts.m4 | 4 ++-- .../lib/triggers/create/species_present.m4 | 4 ++-- 14 files changed, 36 insertions(+), 36 deletions(-) diff --git a/db/schemas/lib/triggers/create/aggressions.m4 b/db/schemas/lib/triggers/create/aggressions.m4 index 7d1eda0..5a8eb41 100644 --- a/db/schemas/lib/triggers/create/aggressions.m4 +++ b/db/schemas/lib/triggers/create/aggressions.m4 @@ -72,7 +72,7 @@ CREATE OR REPLACE FUNCTION aggressions_func () MESSAGE = 'Error on ' || TG_OP || ' of AGGRESSIONS' , DETAIL = 'Aggressions can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_aggression)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Decided) = (' || NEW.Decided @@ -125,7 +125,7 @@ CREATE OR REPLACE FUNCTION aggressions_func () changequote({,})dnl person_active({AGGRESSIONS}, {ExtractedBy}, - {'Key (EID = (' + {'Key (EID) = (' || NEW.eid || '): Value (Decided) = (' || NEW.Decided diff --git a/db/schemas/lib/triggers/create/arrivals.m4 b/db/schemas/lib/triggers/create/arrivals.m4 index e568f88..e6761c0 100644 --- a/db/schemas/lib/triggers/create/arrivals.m4 +++ b/db/schemas/lib/triggers/create/arrivals.m4 @@ -117,7 +117,7 @@ CREATE OR REPLACE FUNCTION arrivals_before_func () MESSAGE = 'Error on ' || TG_OP || ' of ARRIVALS' , DETAIL = 'Arrivals can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_arrival)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -162,7 +162,7 @@ CREATE OR REPLACE FUNCTION arrivals_before_func () RAISE EXCEPTION integrity_constraint_violation USING MESSAGE = 'Error on ' || TG_OP || ' of ARRIVALS' , DETAIL = 'Arrivals must have a related ROLES row' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -272,7 +272,7 @@ CREATE OR REPLACE FUNCTION arrivals_before_func () || NEW.seq || '); the correct value is (' || a_seq - || '): Key (EID = (' + || '): Key (EID) = (' || NEW.eid || '): Value (Seq) = (' || NEW.seq @@ -382,7 +382,7 @@ CREATE OR REPLACE FUNCTION arrivals_func () , DETAIL = 'A female cannot be assigned the' || ' (sdb_male_swelling) code as a sexual cycle' || ' state' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -434,7 +434,7 @@ CREATE OR REPLACE FUNCTION arrivals_func () || ' be assigned the' || ' (sdb_adolescent_swelling) code as a sexual' || ' cycle state' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -482,7 +482,7 @@ CREATE OR REPLACE FUNCTION arrivals_func () || ' assigned the' || ' (sdb_adolescent_swelling) code as a sexual' || ' cycle state' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -533,7 +533,7 @@ CREATE OR REPLACE FUNCTION arrivals_func () || ' sdb_min_swelling_age_units old, cannot be' || ' assigned a cycle code that indicates' || ' sexual swelling' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -579,7 +579,7 @@ CREATE OR REPLACE FUNCTION arrivals_func () || ' sdb_max_swelling_age_units old, cannot be' || ' assigned a cycle code that indicates' || ' sexual swelling' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -624,7 +624,7 @@ CREATE OR REPLACE FUNCTION arrivals_func () , DETAIL = 'A non-female must be assigned the' || ' (sdb_male_swelling) code as a sexual' || ' cycle state' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -778,7 +778,7 @@ CREATE OR REPLACE FUNCTION arrivals_commit_func () || ' with a Seq of (' || NEW.seq - 1 || ') to pair with the ARRIVALS row:' - || ' Key (EID = (' + || ' Key (EID) = (' || NEW.eid || '): Value (Seq) = (' || NEW.seq @@ -853,7 +853,7 @@ CREATE OR REPLACE FUNCTION arrivals_commit_func () || ' with a Seq of (' || OLD.seq || ') to pair with the ARRIVALS row:' - || ' Key (EID = (' + || ' Key (EID) = (' || NEW.eid || '): Value (Seq) = (' || NEW.seq diff --git a/db/schemas/lib/triggers/create/arrivals_a.m4 b/db/schemas/lib/triggers/create/arrivals_a.m4 index 26f1f15..6a75965 100644 --- a/db/schemas/lib/triggers/create/arrivals_a.m4 +++ b/db/schemas/lib/triggers/create/arrivals_a.m4 @@ -74,7 +74,7 @@ CREATE OR REPLACE FUNCTION arrivals_a_func () , DETAIL = 'Arrivals at the feeding station can only be related' || ' to an event with an' || ' EVENTS.Behavior value of (sdb_arrival_a)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -105,7 +105,7 @@ CREATE OR REPLACE FUNCTION arrivals_a_func () changequote({,})dnl person_active({ARRIVALS_A}, {Recorder}, - {'Key (EID = (' + {'Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -114,7 +114,7 @@ CREATE OR REPLACE FUNCTION arrivals_a_func () changequote({,})dnl person_active({ARRIVALS_A}, {Observer2}, - {'Key (EID = (' + {'Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling diff --git a/db/schemas/lib/triggers/create/biography_log.m4 b/db/schemas/lib/triggers/create/biography_log.m4 index 2d13511..240b0af 100644 --- a/db/schemas/lib/triggers/create/biography_log.m4 +++ b/db/schemas/lib/triggers/create/biography_log.m4 @@ -42,7 +42,7 @@ CREATE OR REPLACE FUNCTION biography_log_func () changequote({,})dnl person_active({BIOGRAPHY_LOG}, {MadeBy}, - {'Key (BLID = (' + {'Key (BLID) = (' || NEW.blid || '): Value (DateOfUpdate) = (' || NEW.dateofupdate diff --git a/db/schemas/lib/triggers/create/brecord_notes.m4 b/db/schemas/lib/triggers/create/brecord_notes.m4 index 310b7e6..998a7c2 100644 --- a/db/schemas/lib/triggers/create/brecord_notes.m4 +++ b/db/schemas/lib/triggers/create/brecord_notes.m4 @@ -66,7 +66,7 @@ CREATE OR REPLACE FUNCTION brecord_notes_func () , DETAIL = 'B-Record note taking detail can only be related to an' || ' event with an EVENTS.Behavior value of' || ' (sdb_brec_note)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Observation) = (' || NEW.observation diff --git a/db/schemas/lib/triggers/create/colobus.m4 b/db/schemas/lib/triggers/create/colobus.m4 index 2295842..ba681f3 100644 --- a/db/schemas/lib/triggers/create/colobus.m4 +++ b/db/schemas/lib/triggers/create/colobus.m4 @@ -65,7 +65,7 @@ CREATE OR REPLACE FUNCTION colobus_func () MESSAGE = 'Error on ' || TG_OP || ' of COLOBUS' , DETAIL = 'Colobus hunt detail can only be related to an event' || ' with an EVENTS.Behavior value of (sdb_colobus)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (StartMap) = (' || NEW.startmap diff --git a/db/schemas/lib/triggers/create/comm_memb_log.m4 b/db/schemas/lib/triggers/create/comm_memb_log.m4 index c9d0892..71045b3 100644 --- a/db/schemas/lib/triggers/create/comm_memb_log.m4 +++ b/db/schemas/lib/triggers/create/comm_memb_log.m4 @@ -42,7 +42,7 @@ CREATE OR REPLACE FUNCTION comm_memb_log_func () changequote({,})dnl person_active({COMM_MEMB_LOG}, {MadeBy}, - {'Key (CommMLID = (' + {'Key (CommMLID) = (' || NEW.commmlid || '): Value (DateOfUpdate) = (' || NEW.dateofupdate diff --git a/db/schemas/lib/triggers/create/food_events.m4 b/db/schemas/lib/triggers/create/food_events.m4 index 137ee4a..0c8705e 100644 --- a/db/schemas/lib/triggers/create/food_events.m4 +++ b/db/schemas/lib/triggers/create/food_events.m4 @@ -73,7 +73,7 @@ CREATE OR REPLACE FUNCTION food_events_func () MESSAGE = 'Error on ' || TG_OP || ' of FOOD_EVENTS' , DETAIL = 'Food events can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_food)' - || ': Key (FEID = (' + || ': Key (FEID) = (' || NEW.feid || '): Value (FoodPart) = (' || NEW.foodpart @@ -189,7 +189,7 @@ CREATE OR REPLACE FUNCTION food_events_commit_func () || ' with a Seq of (' || a_seq - 1 || ') to pair with the following FOOD_EVENTS row:' - || ' Key (FEID = (' + || ' Key (FEID) = (' || a_feid || '): Value (FoodPart) = (' || a_foodpart @@ -298,7 +298,7 @@ CREATE OR REPLACE FUNCTION food_events_delete_commit_func () || ' with a Seq of (' || a_seq - 1 || ') to pair with the following FOOD_EVENTS row:' - || ' Key (FEID = (' + || ' Key (FEID) = (' || a_feid || '): Value (FoodPart) = (' || a_foodpart diff --git a/db/schemas/lib/triggers/create/groom_scans_b.m4 b/db/schemas/lib/triggers/create/groom_scans_b.m4 index 60824c4..302d335 100644 --- a/db/schemas/lib/triggers/create/groom_scans_b.m4 +++ b/db/schemas/lib/triggers/create/groom_scans_b.m4 @@ -72,7 +72,7 @@ CREATE OR REPLACE FUNCTION groom_scans_b_func () MESSAGE = 'Error on ' || TG_OP || ' of GROOM_SCANS_B' , DETAIL = 'Groom_Scans_B can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_groom_scan)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Initiator) = (' || textualize(`NEW.initiator') @@ -109,7 +109,7 @@ CREATE OR REPLACE FUNCTION groom_scans_b_func () changequote({,})dnl person_active({GROOM_SCANS_B}, {ExtractedBy}, - {'Key (EID = (' + {'Key (EID) = (' || NEW.EID || ')'}) changequote(`,')dnl diff --git a/db/schemas/lib/triggers/create/groomings.m4 b/db/schemas/lib/triggers/create/groomings.m4 index d8dc11b..0392bf3 100644 --- a/db/schemas/lib/triggers/create/groomings.m4 +++ b/db/schemas/lib/triggers/create/groomings.m4 @@ -73,7 +73,7 @@ CREATE OR REPLACE FUNCTION groomings_func () MESSAGE = 'Error on ' || TG_OP || ' of GROOMINGS' , DETAIL = 'Groomings can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_grooming)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Initiator) = (' || textualize(`NEW.initiator') @@ -110,7 +110,7 @@ CREATE OR REPLACE FUNCTION groomings_func () changequote({,})dnl person_active({GROOMINGS}, {ExtractedBy}, - {'Key (EID = (' + {'Key (EID) = (' || NEW.EID || ')'}) changequote(`,')dnl @@ -155,7 +155,7 @@ define({_sdb_grm_actor_or_actee}, || textualize(NEW.$1) || '); $1 must be one of the participaints' || ' in the grooming event' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Initiator) = (' || textualize(`NEW.initiator') diff --git a/db/schemas/lib/triggers/create/humans.m4 b/db/schemas/lib/triggers/create/humans.m4 index 69d9731..07e0bed 100644 --- a/db/schemas/lib/triggers/create/humans.m4 +++ b/db/schemas/lib/triggers/create/humans.m4 @@ -66,7 +66,7 @@ CREATE OR REPLACE FUNCTION humans_func () MESSAGE = 'Error on ' || TG_OP || ' of HUMANS' , DETAIL = 'Humans can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_other_species)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Researchers) = (' || NEW.researchers @@ -113,7 +113,7 @@ CREATE OR REPLACE FUNCTION humans_func () , DETAIL = 'Humans cannot be related to an event that is' || ' also related to another species presence,' || ' but there is a related SPECIES_PRESENT row' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Researchers) = (' || NEW.researchers diff --git a/db/schemas/lib/triggers/create/matings.m4 b/db/schemas/lib/triggers/create/matings.m4 index 8251da6..aedc4aa 100644 --- a/db/schemas/lib/triggers/create/matings.m4 +++ b/db/schemas/lib/triggers/create/matings.m4 @@ -73,7 +73,7 @@ CREATE OR REPLACE FUNCTION matings_func () MESSAGE = 'Error on ' || TG_OP || ' of MATINGS' , DETAIL = 'Matings can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_mating_event)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Swelling) = (' || NEW.swelling @@ -110,7 +110,7 @@ CREATE OR REPLACE FUNCTION matings_func () changequote({,})dnl person_active({MATINGS}, {ExtractedBy}, - {'Key (EID = (' + {'Key (EID) = (' || NEW.EID || '): Value (CommID) = (' || NEW.commid diff --git a/db/schemas/lib/triggers/create/pantgrunts.m4 b/db/schemas/lib/triggers/create/pantgrunts.m4 index 2a4fe19..118ca7c 100644 --- a/db/schemas/lib/triggers/create/pantgrunts.m4 +++ b/db/schemas/lib/triggers/create/pantgrunts.m4 @@ -73,7 +73,7 @@ CREATE OR REPLACE FUNCTION pantgrunts_func () MESSAGE = 'Error on ' || TG_OP || ' of PANTGRUNTS' , DETAIL = 'Pantgrunts can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_pg_event)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (MultiActors) = (' || NEW.multiactors @@ -112,7 +112,7 @@ CREATE OR REPLACE FUNCTION pantgrunts_func () changequote({,})dnl person_active({PANTGRUNTS}, {EnteredBy}, - {'Key (EID = (' + {'Key (EID) = (' || NEW.EID || '): Value (CommID) = (' || NEW.commid diff --git a/db/schemas/lib/triggers/create/species_present.m4 b/db/schemas/lib/triggers/create/species_present.m4 index 838c5b9..f1fd4ba 100644 --- a/db/schemas/lib/triggers/create/species_present.m4 +++ b/db/schemas/lib/triggers/create/species_present.m4 @@ -66,7 +66,7 @@ CREATE OR REPLACE FUNCTION species_present_func () MESSAGE = 'Error on ' || TG_OP || ' of SPECIES_PRESENT' , DETAIL = 'Species_Present can only be related to an event with an' || ' EVENTS.Behavior value of (sdb_other_species)' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Researchers) = (' || NEW.researchers @@ -114,7 +114,7 @@ CREATE OR REPLACE FUNCTION species_present_func () , DETAIL = 'Species_Present cannot be related to an event that' || ' is also related to a human presence,' || ' but there is a related HUMANS row' - || ': Key (EID = (' + || ': Key (EID) = (' || NEW.eid || '): Value (Researchers) = (' || NEW.researchers -- 2.34.1