Re: GUC with units, details

Поиск
Список
Период
Сортировка
От Thomas Hallgren
Тема Re: GUC with units, details
Дата
Msg-id 44C72437.6070403@tada.se
обсуждение исходный текст
Ответ на Re: GUC with units, details  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs wrote:
> don't ever need to say that K = 1000, AFAICS. I think we are safe to
> assume that 
> 
>     kB = KB = kb = Kb = 1024 bytes
> 
>     mB = MB = mb = Mb = 1024 * 1024 bytes
> 
>     gB = GB = gb = Gb = 1024 * 1024 * 1024 bytes
> 
> There's no value in forcing the use of specific case and it will be just
> confusing for people.
> 
It's fairly common to use 'b' for 'bits' and 'B' for 'bytes'. My suggestion would be to be 
much more restrictive and avoid small caps:

KB = 1024 bytes
MB = 1024 KB
GB = 1024 KB
TB = 1024 GB

Although I don't expect to see bit-rates or fractions ('m' == 'milli') in GUC, it might be 
good to use consistent units everywhere.

Regards,
Thomas Hallgren


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: GUC with units, details
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: [PATCHES] Time zone definitions to config files