How can I return table in Stored Procedure ? I can do it in function but I have inout parameters.So I can not create in function. What can I do this case ?
I guess,It should be like for function :
CREATEor REPLACE FUNCTIONpublic."test"(INOUT "x" integer, INOUT "y" text)
RETURNS TABLE("id" integer,"filesize" character varying(36))AS$$BEGINRETURN QUERY
SELECT*FROMpublic."tbl_employees";END;$$ LANGUAGE plpgsql;
Thanks.
You can returns cursor via OUT variable. That's all. There is not any other possibility. Procedures in Postgres can returns results only via OUT variables.