Postgres Call Function From Procedure Definition