pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Christoph Berg <myon@debian.org>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <stark@mit.edu>
To: David G. Johnston <david.g.johnston@gmail.com>
To: thomas.berger@1und1.de, PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_size_pretty, SHOW, and spaces
Date: Tue, 2 Aug 2016 12:51:16 -0400
Message-ID: <20160802165116.GC32575@momjian.us> (raw)
In-Reply-To: <20160802092901.xg5ag7emdxoajhds@msg.df7cb.de>
References: <f3e021d3-d843-04a5-d816-6921309b3bf1@2ndquadrant.com>
	<20160801162508.GA28246@momjian.us>
	<20160802092901.xg5ag7emdxoajhds@msg.df7cb.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Tue, Aug  2, 2016 at 11:29:01AM +0200, Christoph Berg wrote:
> > The issue is that we output "10 bytes", not "10bytes", but for units we
> > use "977KB".  That seems inconsistent, but it is the normal policy
> > people use.  I think this is because "977KB" is really "977K bytes", but
> > we just append the "B" after the "K" for bevity.
> 
> It's the other way round:
> 
> https://en.wikipedia.org/wiki/International_System_of_Units#General_rules
> 
> | The value of a quantity is written as a number followed by a space
> | (representing a multiplication sign) and a unit symbol; e.g., 2.21 kg
> [...]
> 
> I'd opt to omit the space anywhere where the value is supposed to be
> fed back into the config (SHOW, --parameters), but use the "pretty"
> format with space everywhere otherwise (documentation, memory counts
> in explain output, pg_size_pretty() etc.)

Yes, that's a strong argument for using a space.  I have adjusted the
patch to use spaces in all reasonable places.  Patch attached, which I
have gzipped because it was 133 KB.  (Ah, see what I did there?)  :-)

I am thinking of leaving the 9.6 docs alone as I have already made them
consistent (no space) with minimal changes.  We can make it consistent
the other way in PG 10.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

  kilo2.diff.gz (application/gzip, 27.0K) download

view thread (9+ messages)  latest in thread

Message-ID: <20160802165116.GC32575@momjian.us>
Permalink:  ../20160802165116.GC32575@momjian.us/
Also on:    postgresql.org/message-id/20160802165116.GC32575@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, myon@debian.org, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, stark@mit.edu, david.g.johnston@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: pg_size_pretty, SHOW, and spaces
  In-Reply-To: <20160802165116.GC32575@momjian.us>
  References: <f3e021d3-d843-04a5-d816-6921309b3bf1@2ndquadrant.com> <20160801162508.GA28246@momjian.us> <20160802092901.xg5ag7emdxoajhds@msg.df7cb.de> <20160802165116.GC32575@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox