結果 : postgresql case when in function