pl/pgsql how to return multiple values from a function - Mailing list pgsql-sql

From jack
Subject pl/pgsql how to return multiple values from a function
Date
Msg-id 000901c2e5ec$b1411430$1400a8c0@jac
Whole thread Raw
Responses Re: pl/pgsql how to return multiple values from a function
List pgsql-sql
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';




pgsql-sql by date:

Previous
From: daniel alvarez
Date:
Subject: Re: Atomicity of UPDATE, interchanging values in unique
Next
From: "jack"
Date:
Subject: Re: pl/pgsql how to return multiple values from a function