Hi, all
I use "RETURNS RECORD" to return a multiple values from a function as
following but it doesn't work at all. Or is there any other way to do it?
Thank you jin advance!
;-----
CREATE OR REPLACE FUNCTION tesP_returnRec2( ) RETURNS INTEGER AS'
DECLARErec RECORD;
BEGINSELECT INTO rec tesP_returnRec1();RAISE NOTICE ''jj=%, ss=%'', rec.jj,rec.ss;RETURN 0;
END;'LANGUAGE 'PLPGSQL';
;-------
CREATE OR REPLACE FUNCTION tesP_returnRec1( ) RETURNS RECORD AS'
DECLARErec RECORD;
BEGINSELECT INTO rec CAST(100 AS INTEGER) AS jj, CAST(''ABC'' AS VARCHAR(10)) AS ss;RETURN rec;
END;'LANGUAGE 'PLPGSQL';