I have a function which roughly looks like this:
create or replace function fn_my_function(my_int_in int) returns setof my_type language plpgsql immut