Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-09-14 Thread Gavin Flower
On 15/09/16 03:45, Robert Haas wrote: On Wed, Sep 14, 2016 at 5:22 AM, Thomas Berger wrote: Today, i found the time to read all the mails in this thread, and i think i have to explain, why we decided to open a bug for this behavior. Pn Tuesday, 23. August 2016,

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-09-14 Thread Tom Lane
Robert Haas writes: > Interesting. I think that our documentation should only describe the > way we use unit suffixes in one central place, but other places (like > pg_size_pretty) could link to that central place. > I don't believe that there is any general unanimity

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-09-14 Thread Robert Haas
On Wed, Sep 14, 2016 at 5:22 AM, Thomas Berger wrote: > Today, i found the time to read all the mails in this thread, and i think i > have to explain, why we decided to open a bug for this behavior. > > Pn Tuesday, 23. August 2016, 13:30:29 Robert Haas wrote: >> J. Random

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-09-14 Thread Thomas Berger
Today, i found the time to read all the mails in this thread, and i think i have to explain, why we decided to open a bug for this behavior. Pn Tuesday, 23. August 2016, 13:30:29 Robert Haas wrote: > J. Random User: I'm having a problem! > Mailing List: Gee, how big are your tables? > J. Random

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-09-13 Thread Peter Eisentraut
On 7/30/16 2:16 PM, Bruce Momjian wrote: > 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

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Robert Haas
On Tue, Aug 23, 2016 at 2:33 PM, Bruce Momjian wrote: > Well, the patch was updated several times, and the final version was not > objected to until you objected. It is not clear what you mean by "the final version", because you posted two different final versions. I don't see

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Alvaro Herrera
Bruce Momjian wrote: > On Tue, Aug 23, 2016 at 02:31:26PM -0400, Robert Haas wrote: > > On Tue, Aug 23, 2016 at 1:57 PM, Bruce Momjian wrote: > > > That's why I was asking you to comment on the final patch, which I am > > > planning to apply to PG 10 soon. > > > > Oh, OK. I

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Bruce Momjian
On Tue, Aug 23, 2016 at 11:35:35AM -0700, Andres Freund wrote: > On 2016-08-23 14:33:15 -0400, Bruce Momjian wrote: > > On Tue, Aug 23, 2016 at 02:31:26PM -0400, Robert Haas wrote: > > > On Tue, Aug 23, 2016 at 1:57 PM, Bruce Momjian wrote: > > > > That's why I was asking you to

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Andres Freund
On 2016-08-23 14:33:15 -0400, Bruce Momjian wrote: > On Tue, Aug 23, 2016 at 02:31:26PM -0400, Robert Haas wrote: > > On Tue, Aug 23, 2016 at 1:57 PM, Bruce Momjian wrote: > > > That's why I was asking you to comment on the final patch, which I am > > > planning to apply to PG

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Bruce Momjian
On Tue, Aug 23, 2016 at 02:31:26PM -0400, Robert Haas wrote: > On Tue, Aug 23, 2016 at 1:57 PM, Bruce Momjian wrote: > > That's why I was asking you to comment on the final patch, which I am > > planning to apply to PG 10 soon. > > Oh, OK. I didn't understand that that was

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Robert Haas
On Tue, Aug 23, 2016 at 1:57 PM, Bruce Momjian wrote: > That's why I was asking you to comment on the final patch, which I am > planning to apply to PG 10 soon. Oh, OK. I didn't understand that that was what you are asking. I don't find either of your proposed final patches

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Bruce Momjian
On Tue, Aug 23, 2016 at 01:53:25PM -0400, Robert Haas wrote: > On Tue, Aug 23, 2016 at 1:47 PM, Bruce Momjian wrote: > >> I have already read the entire thread, and replied only after reading > >> all messages. > > > > Well, what are you replying to then? > > Your original

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Robert Haas
On Tue, Aug 23, 2016 at 1:47 PM, Bruce Momjian wrote: >> I have already read the entire thread, and replied only after reading >> all messages. > > Well, what are you replying to then? Your original message. I'm arguing that we should not change the behavior, as you proposed

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Bruce Momjian
On Tue, Aug 23, 2016 at 01:45:44PM -0400, Robert Haas wrote: > On Tue, Aug 23, 2016 at 1:43 PM, Bruce Momjian wrote: > > On Tue, Aug 23, 2016 at 01:30:29PM -0400, Robert Haas wrote: > >> On Fri, Jul 29, 2016 at 8:18 PM, Bruce Momjian wrote: > >> > and the

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Robert Haas
On Tue, Aug 23, 2016 at 1:43 PM, Bruce Momjian wrote: > On Tue, Aug 23, 2016 at 01:30:29PM -0400, Robert Haas wrote: >> On Fri, Jul 29, 2016 at 8:18 PM, Bruce Momjian wrote: >> > and the units were copied when pg_size_pretty() was implemented. These >> >

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Bruce Momjian
On Tue, Aug 23, 2016 at 01:30:29PM -0400, Robert Haas wrote: > On Fri, Jul 29, 2016 at 8:18 PM, Bruce Momjian wrote: > > and the units were copied when pg_size_pretty() was implemented. These > > units are based on the International System of Units (SI)/metric. > > However, the

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-23 Thread Robert Haas
On Fri, Jul 29, 2016 at 8:18 PM, Bruce Momjian wrote: > The Postgres docs specify that kB is based on 1024 or 2^10: > > https://www.postgresql.org/docs/9.6/static/functions-admin.html > > Note: The units kB, MB, GB and TB used by the functions >

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-01 Thread Pavel Stehule
2016-08-01 20:51 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 7/30/16 1:18 AM, Pavel Stehule wrote: > > We talked about this issue, when I wrote function pg_size_bytes. It is > > hard to fix these functions after years of usage. The new set of > > functions can be better >

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-01 Thread Bruce Momjian
On Mon, Aug 1, 2016 at 02:48:55PM -0400, Peter Eisentraut wrote: > On 7/30/16 2:16 PM, Bruce Momjian wrote: > > 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

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-01 Thread Peter Eisentraut
On 7/30/16 1:18 AM, Pavel Stehule wrote: > We talked about this issue, when I wrote function pg_size_bytes. It is > hard to fix these functions after years of usage. The new set of > functions can be better > > pg_iso_size_pretty(); > pg_iso_size_bytes(); One thing that would actually be nice

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-08-01 Thread Peter Eisentraut
On 7/30/16 2:16 PM, Bruce Momjian wrote: > 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

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-30 Thread Joshua D. Drake
On 07/30/2016 11:16 AM, Bruce Momjian wrote: On Sat, Jul 30, 2016 at 10:35:58AM -0400, Tom Lane wrote: Greg Stark writes: 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

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-30 Thread Bruce Momjian
On Sat, Jul 30, 2016 at 10:35:58AM -0400, Tom Lane wrote: > Greg Stark 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

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-30 Thread David G. Johnston
On Sat, Jul 30, 2016 at 10:35 AM, Tom Lane wrote: > Greg Stark 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

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-30 Thread Tom Lane
Greg Stark 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

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-30 Thread Greg Stark
On Sat, Jul 30, 2016 at 2:47 AM, David G. Johnston wrote: > After bouncing on this for a bit I'm inclined to mark the bug itself "won't > fix" but introduce a "to_binary_iso" function (I'm hopeful a better name > will emerge...) that will output a number using ISO

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-29 Thread Pavel Stehule
2016-07-30 3:47 GMT+02:00 David G. Johnston : > On Fri, Jul 29, 2016 at 8:18 PM, Bruce Momjian wrote: > >> On Tue, Jul 12, 2016 at 01:36:38PM +, thomas.ber...@1und1.de wrote: >> > The following bug has been logged on the website: >> > >> > Bug

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-29 Thread David G. Johnston
On Fri, Jul 29, 2016 at 8:18 PM, Bruce Momjian wrote: > On Tue, Jul 12, 2016 at 01:36:38PM +, thomas.ber...@1und1.de wrote: > > The following bug has been logged on the website: > > > > Bug reference: 14244 > > Logged by: Thomas Berger > > Email address:

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-29 Thread Bruce Momjian
On Fri, Jul 29, 2016 at 08:18:38PM -0400, Bruce Momjian wrote: > However, that is not the end of the story. Things have moved forward > since 2006 and there is now firm support for either KB or KiB to be > 1024-based units. This blog post explains the current state of prefix > specification: >

Re: [HACKERS] [BUGS] BUG #14244: wrong suffix for pg_size_pretty()

2016-07-29 Thread Bruce Momjian
On Tue, Jul 12, 2016 at 01:36:38PM +, thomas.ber...@1und1.de wrote: > The following bug has been logged on the website: > > Bug reference: 14244 > Logged by: Thomas Berger > Email address: thomas.ber...@1und1.de > PostgreSQL version: 9.5.3 > Operating system: any >