I want to use the inout return in my procedure like this:
do $$
declare
film_count text;
begin
-- get the number of films
CALL abc('999-M-120-20200906-E726265',
'911120006710', '120', null);
film_count = o_ricode;
-- display a message
raise notice 'The number of films is %', film_count;
end $$;
where o_ricode is inout param of proc 'abc'.
ERROR: procedure parameter "o_ricode" is an output parameter but the corresponding argument is not writable CONTEXT: PL/pgSQL function inline_code_block line 6 at CALL SQL state: 42601
Calling abc procedure separately giving the expected results but calls in another procedure not working.
CREATE OR REPLACE PROCEDURE abc(
INOUT o_ricode text)
LANGUAGE 'plpgsql'
AS $BODY$
DECLARE
BEGIN
o_ricode := 'SUCCESS';
END;
$BODY$;