Re: [PATCH] Cleanup of GUC units code - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [PATCH] Cleanup of GUC units code
Date
Msg-id 1220507526.7603.35.camel@huvostro
Whole thread Raw
In response to Re: [PATCH] Cleanup of GUC units code  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [PATCH] Cleanup of GUC units code  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
On Wed, 2008-09-03 at 20:01 -0400, Alvaro Herrera wrote:
> Hannu Krosing escribió:
> 
> > I mean, there is no known written standard, which says that Mb is
> > megabit, not megabyte or that you can (or can't) write kilo as K, but
> > some people just believe that kB is "the Way" and allowing people to
> > write kilobytes as KB or kb is evil and should be punished.
> 
> Yes there is --- it's the SI.
> 
> http://en.wikipedia.org/wiki/SI#SI_writing_style
> 
> I don't know about it being "evil" and punishment, but it's wrong.

SI defines decimal-based prefixes, where k = kilo = 1000, so our current
conf use is also wrong.

http://en.wikipedia.org/wiki/Kilobyte
...
1024 bytes (2^10): This unit is used when expressing quantities which
are based on powers of two, such as memory chip capacities. Most
software also expresses storage capacity in units of 1024 bytes.
Although the use of kilobyte for this unit is common, this usage has
been expressly forbidden by the SI standard and other standards
organisations. To indicate a quantity of 1024 bytes, the term kibibyte
(KiB) has been recommended instead.


And no, I am not proposing switching conf units to KiB, nor am I
proposing to use MB to mean 1 000 000. I'm quite happy with us being
"wrong" in 1000 v. 1024 area.

---------------
Hannu




pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: [PATCH] Cleanup of GUC units code
Next
From: Dimitri Fontaine
Date:
Subject: Re: [PATCH] Cleanup of GUC units code