egdb3_11_7
.acq
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
fap_limit_100()
Parameters
Name
Type
Mode
IN
Definition
DECLARE -- total_percent numeric; -- BEGIN SELECT sum( percent ) INTO total_percent FROM acq.fund_allocation_percent AS fap WHERE fap.funding_source = NEW.funding_source; -- IF total_percent > 100 THEN RAISE EXCEPTION 'Total percentages exceed 100 for funding_source %', NEW.funding_source; ELSE RETURN NEW; END IF; END;