Hi , I have below function adf with inout, out
parameter , CREATE OR REPLACE FUNCTION adf(inout
voutvar integer , out vVar integer) AS $BODY$ BEGIN voutvar := 20; vvar := 10; RETURN; END; $BODY$ LANGUAGE 'plpgsql' After compiling I get below signature of function
adf(integer) and return type as record. CREATE OR REPLACE FUNCTION adf(INOUT
voutvar integer, OUT vvar integer) RETURNS record AS I wanted to catch output parameter –
Vvar . Below function tt , tries adf, CREATE OR REPLACE FUNCTION tt() RETURNS VOID AS $BODY$ DECLARE ii integer; vout integer; BEGIN --vvar := 10; vout := 10; perform
adf(vout) ; RETURN; END; $BODY$ LANGUAGE 'plpgsql'; I have a couple of questions on above function
1) Why the return type is record after compiling? 2) How to catch the return value of out parameter
for above case value of vVar. Thanks, |