Hi,
Problem is inside nm_create_friend(uuid, text) - return type is VOID but
there is a SELECT inside. There is no "space" for produced rows.
My suggestion is to add record variable and use SELECT INTO then check if
vairalble is empty or not.
Regards,
Bartek