Forum OpenACS Development: Re: OpenACS 5.8.1 - PL/pgSQL functions application_group__delete and acs_group__delete
I remember that I have stumbled upon the same issue some time ago. IIRC the solution was to remove (comment) the two lines
--delete from groups
--where group_id = delete__group_id;
The group will still be deleted by some other/later function/mechanism (AFAIR).