By George, I think you've got it!
(Imagine a hokey imitation British accent.)
I only had to make one small change. It complained it didn't know about a column named "charge". When I changed it to:
select charge, (cn).* from (select charge, chargeneeds(charge) as cn from charge) q;
it worked.
Thanks for all your time and effort!
RobR