I got some SQL function
CREATE OR REPLACE FUNCTION tools.update_company(IN company_id integer, OUT value integer)
RETURNS integer AS
$BODY$
BEGIN
select * into value from function_making_int(company_id)
END;$BODY$
and from Psycopg2 (its inside Django if that matters) I do
c = connection.cursor()
c.callproc('tools.update_company', [1, ])
but function returns exactly the same input sequence as I gave, ignoring results and OUT parameter. Change to IN OUT and passing some foo value changes nothing. When called within database SQL function works as expected