I'm sorry, everything is in order.Today I looked with fresh eyes, a slight adjustment in the callingfunction and it works.Thanks for your attention.
Best regards.Ps. recently I deal with postgresql and I wanted to consult with you.