1
CREATE OR REPLACE FUNCTION check_group_namespacing_insertupdate()
6
SELECT offeringid INTO oid FROM project_set WHERE project_set.projectsetid = NEW.projectsetid;
7
PERFORM 1 FROM project_group, project_set WHERE project_set.offeringid = oid AND project_group.projectsetid = project_set.projectsetid AND project_group.groupnm = NEW.groupnm;
9
RAISE EXCEPTION ''a project group named % already exists in offering ID %'', NEW.groupnm, oid;