結果 : postgresql case statement in function