結果 : postgres function loop through array