Do something like this if you haven't already found it.
create or replace function fin2(org_id integer, num_courses ...)
returns table (unswid int, student_name varchar(128), code char(8), ....)
AS $BODY$
Select unswid, student_name, ....
FROM fin(org_id, nu...) as fin;
$BODY$
LANGUAGE sql;
On Wednesday, May 9, 2018 at 10:02:21 PM UTC+10, MINGMAN ZHENG wrote: