Re: [PATCH] Remove workarounds to format [u]int64's

Поиск
Список
Период
Сортировка
Искать
От
Japin Li
Тема
Re: [PATCH] Remove workarounds to format [u]int64's
Дата
Msg-id
MEYP282MB16693D00579208E2C272CACAB6169@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Ответ на
Список
Дерево обсуждения
[PATCH] Remove workarounds to format [u]int64's Aleksander Alekseev <aleksander@timescale.com>
Re: [PATCH] Remove workarounds to format [u]int64's Pavel Borisov <pashkin.elfe@gmail.com>
Re: [PATCH] Remove workarounds to format [u]int64's Aleksander Alekseev <aleksander@timescale.com>
Re: [PATCH] Remove workarounds to format [u]int64's Pavel Borisov <pashkin.elfe@gmail.com>
Re: [PATCH] Remove workarounds to format [u]int64's Japin Li <japinli@hotmail.com>
Re: [PATCH] Remove workarounds to format [u]int64's Aleksander Alekseev <aleksander@timescale.com>

On Mon, 21 Mar 2022 at 17:23, Aleksander Alekseev  wrote:
> Hi Pavel,
>
>> Probably you can do (long long) instead of (long long int). It is shorter and this is used elsewhere in the code.
>
> Thanks! Here is the updated patch. I also added Reviewed-by: and
> Discussion: to the commit message.

Hi,

After apply the patch, I found pg_checksums.c also has the similar code.

In progress_report(), I'm not sure we can do this replace for this code.

    snprintf(total_size_str, sizeof(total_size_str), INT64_FORMAT,
             total_size / (1024 * 1024));
    snprintf(current_size_str, sizeof(current_size_str), INT64_FORMAT,
             current_size / (1024 * 1024));

    fprintf(stderr, _("%*s/%s MB (%d%%) computed"),
            (int) strlen(current_size_str), current_size_str, total_size_str,
            percent);

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

В списке pgsql-hackers по дате отправления
От: Amit Kapila
Дата:
От: Jehan-Guillaume de Rorthais
Дата:
FAQ