as 'begin notify jobset_shares_changed; return null; end;' language plpgsql;
after update on Jobsets for each row
when (old.schedulingShares != new.schedulingShares) execute procedure notifyJobsetSharesChanged ;
update Jobsets set schedulingShares = 1 where schedulingShares <= 0;
Jobsets add constraint jobsets_check check (schedulingShares > 0);
returns trigger