Re: GUC with units, details

From: Thomas Hallgren <thomas(at)tada(dot)se>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, "Bort, Paul" <pbort(at)tmwsystems(dot)com>
Subject: Re: GUC with units, details
Date: 2006-07-26 08:13:43
Message-ID: 44C72437.6070403@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joachim Wieland 2006-07-26 08:17:22 Re: Time zone definitions to config files
Previous Message jkzhao 2006-07-26 07:49:37 default lower case of identifier