Sorry this took so long. Finally found some time to look into this.

First, there is something strange going on with calling PostgreSQL stored procedures. I could not get that working yet.
This seems related to the fact in PostgreSQL stored procedures can not return any values.

PostgreSQL functions however, do work and they can be called with SQLCall.

The error you are getting might be related to having the stored procedure/function defined as case sensitive.
I found this only works if you define the name of the stored procedure in all lowercase.

I have setup the following test:
create or replace function getorders (totalfrom integer, totalto integer)
    returns table (
        "Order_Number" integer,
        "Customer_Number" integer ,
        "Terms" character(12) 
    language plpgsql
as $$
    return query 
        Select "OrderHeader"."Order_Number"
                , "OrderHeader"."Customer_Number"
                , "OrderHeader"."Terms"
        from "OrderHeader"
        Where "Order_Total" > totalfrom And "Order_Total" < totalto;
It is important to define the function name (getorders) with all lowercase.

I can call this function then from DataFlex as follows:
Get SQLConnectionId of ghoConnection "PostgreSQLOrderID" to hoConnect

Get SQLOpen of hoConnect to hStmt
Send SQLSetProcedurename of hStmt "getorders" "public"

Move 200 to iParam
Send SQLSetArgument of hStmt 1 iParam

Move 300 to iParam2
Send SQLSetArgument of hStmt 2 iParam2

Send SqlCall of hStmt

Get SQLFetchResultsetValues of hStmt to sData
Again the function name must be specified in all lowercase, otherwise it will not work.

I am looking if we can improve on this, but for now the above works for me.