> On 2016/03/08 18:19, Kyotaro HORIGUCHI wrote:
>> + WHEN 0 THEN 100::numeric(5, 2)
>> + ELSE ((S.param3 + 1)::numeric / S.param2 * 100)::numeric(5, 2)
>>
>> This usage of numeric seems overkill to me.
>
> Hmm, how could this rather be written?
OK, agreed about the overkill. Following might be better:
+ WHEN 0 THEN round(100.0, 2)
+ ELSE round((S.param3 + 1) * 100.0 / S.param2, 2)
Will update that patch.
Thanks,
Amit