You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing deleting an observation in the context of the calibrations process
I managed to make the deletion but I get a bogus ch_group_edit event producing the error: Invalid group and/or event: Notification(28296,ch_group_edit,)
The last entry is the value of the notification.
I have examined the places where triggers produce a group_edit and I can't see how it can be empty
The text was updated successfully, but these errors were encountered:
These are the places where a group edit is produced
ch_group_edit
CREATE OR REPLACEFUNCTIONch_group_edit()
RETURNS trigger AS $$
DECLARE
BEGIN
PERFORM pg_notify('ch_group_edit', NEW.c_group_id||','||NEW.c_program_id||','|| nextval('s_event_id')::text||','|| TG_OP);
RETURN NEW; -- n.b. doesn't matter, it's an AFTER trigger
END;
$$ LANGUAGE plpgsql;
ch_obs_group_edit
CREATE OR REPLACEFUNCTIONch_obs_group_edit()
RETURNS trigger AS $$
DECLARE
BEGIN-- notify old group, if any
IF (TG_OP ='UPDATE'OR TG_OP ='DELETE') THEN
PERFORM pg_notify('ch_group_edit', coalesce(OLD.c_group_id, 'null') ||','||NEW.c_program_id||','||'UPDATE');
END IF;
-- notify new group, if any
IF (TG_OP ='INSERT'OR TG_OP ='UPDATE'OR TG_OP ='DELETE') THEN
PERFORM pg_notify('ch_group_edit', coalesce(NEW.c_group_id, 'null') ||','||NEW.c_program_id||','||'UPDATE');
END IF;
RETURN NEW; -- n.b. doesn't matter, it's an AFTER trigger
END;
$$ LANGUAGE plpgsql;
I'm implementing deleting an observation in the context of the calibrations process
I managed to make the deletion but I get a bogus ch_group_edit event producing the error:
Invalid group and/or event: Notification(28296,ch_group_edit,)
The last entry is the value of the notification.
I have examined the places where triggers produce a group_edit and I can't see how it can be empty
The text was updated successfully, but these errors were encountered: