Thanks, Greg.
1. This means what I am trying to do is not meant to work. This won’t work even if I declare the function before calling it in PSQL. I get it. 2. You are correct. Function must be declared before the call.
Thanks again.