-- -- parties_in_tr/0 -- create or replace function parties_in_tr( ) returns trigger as $$ BEGIN insert into party_approved_member_map (party_id, member_id, originating_rel_id) values (new.party_id, new.party_id, -10); return new; END; $$ language plpgsql;