--
-- membership_rel__approve/1
--
create or replace function membership_rel__approve(
  integer
) returns int4 as $$

declare
  approve__rel_id               alias for $1;  
begin
    update membership_rels
    set member_state = 'approved'
    where rel_id = approve__rel_id;

    return 0; 
end;$$ language plpgsql;