結果 : postgres case statement in function