Pass variable as an input argument to a function inside another function in PostgreSQL
answer from a jjanes comment:
&quot;The error indicates that for some reason left_bipolar contains a space just before the call. I guess convert_to_bipolar8 must put the space there. But we can't see the code for it, not what input you called the outer function with&quot;