Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group