Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FOREACH v_recipient IN ARRAY recipients
- LOOP
- v_total := v_total + v_recipient.amount;
- INSERT INTO tmp_recipients(id, amount) VALUES(v_recipient.id, v_recipient.amount::numeric(10,2));
- END LOOP;
- FOR v_recipient IN SELECT vr FROM unnest(recipients) x(vr)
- LOOP
- ....
- END LOOP;
Add Comment
Please, Sign In to add comment