I have several postgres functions with params that return SETOF or SELECT:
CREATE OR REPLACE FUNCTION detail_product (ref_product TEXT)
RETURNS SETOF product
AS $$
BEGIN
RETURN QUERY SELECT * FROM product WHERE ref = ref_product;
END;
$$
LANGUAGE ‘plpgsql’;
When I run this from the sql editor:
SELECT * FROM “schema”.“detail_product”(:ref_product)
I get this error:
Error while refreshing data: Unsupported DataType Unknown
I can’t get a dataset if build this as a command - as command execute ok, but don’t get the data back-, so I suspect is necesary to add this as a datatable
I use DEVART/Postgres 9.1
P.D: When the option “Create NEW EXEC Statement” is executed, it add ‘"’ character around the param, and is wrong:
SELECT * FROM “superventas”.“detail_product”(:“ref_product”)
Error while refreshing data: Unsupported DataType Unknown
Please try to set type for this parameter manually in schema.
P.D: When the option “Create NEW EXEC Statement” is executed, it add ‘"’ character around the param, and is wrong:
Can you provide your connection string?
What DA version do you use?
Yes, I ask about that issue, and that is what I’m doing. However, I don’t see how generate the dataset with params & fields. I only can get the fields or the params, not both.