ERROR: Function cannot execute on segment because it accesses ...