Re: [PROPOSAL] VACUUM Progress Checker.

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: robertmhaas(at)gmail(dot)com, amitlangote09(at)gmail(dot)com, pokurev(at)pm(dot)nttdata(dot)co(dot)jp, pgsql-hackers(at)postgresql(dot)org, bannos(at)nttdata(dot)co(dot)jp
Subject: Re: [PROPOSAL] VACUUM Progress Checker.
Date: 2016-03-09 07:28:50
Message-ID: 56DFD0B2.7060000@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2016-03-09 07:30:31 Re: pam auth - add rhost item
Previous Message Ashutosh Bapat 2016-03-09 07:23:15 Re: Pushing down sorted joins