結果 : postgresql function if multiple conditions