From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Greg Stark <stark(at)mit(dot)edu>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, thomas(dot)berger(at)1und1(dot)de, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty() |
Date: | 2016-07-30 18:16:43 |
Message-ID: | 20160730181643.GD22405@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Sat, Jul 30, 2016 at 10:35:58AM -0400, Tom Lane wrote:
> Greg Stark <stark(at)mit(dot)edu> writes:
> > I think Bruce's summary is a bit revisionist.
>
> I would say it's a tempest in a teapot.
>
> What I think we should do is accept "kb" and the rest case-insensitively,
> print them all in all-upper-case always, and tell standards pedants
> to get lost. The idea of introducing either a GUC or new function names
> is just silly; it will cause far more confusion and user code breakage
> than will result from just leaving well enough alone.
I agree that a GUC and new functions are overkill --- we should just
decide on the format we want to output and what to support for input.
As logical as the IEC format appears, I just don't think the Ki/Mi/Gi
prefixes are used widely enough for us to use it --- I think it will
cause too many problem reports:
https://en.wikipedia.org/wiki/Binary_prefix
I have developed two possible patches for PG 10 --- the first one merely
allows "KB" to be used in addition to the existing "kB", and documents
this as an option.
The second patch does what Tom suggests above by outputting only "KB",
and it supports "kB" for backward compatibility. What it doesn't do is
to allow arbitrary case, which I think would be a step backward. The
second patch actually does match the JEDEC standard, except for allowing
"kB".
I also just applied a doc patch that increases case and spacing
consistency in the use of kB/MB/GB/TB.
--
Bruce Momjian <bruce(at)momjian(dot)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 +
Attachment | Content-Type | Size |
---|---|---|
kilo.diff | text/x-diff | 1.4 KB |
kilo2.diff | text/x-diff | 80.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2016-07-30 20:04:12 | Re: BUG #14170: error message in case LOCALE de_DE.UTF8 is used in combination with CLIENT_ENCODING=LATIN1 |
Previous Message | David G. Johnston | 2016-07-30 14:55:40 | Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty() |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2016-07-30 18:18:12 | Re: sslmode=require fallback |
Previous Message | David Steele | 2016-07-30 15:30:38 | Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables) |