Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty() - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()
Date
Msg-id CAKFQuwZPJX-u8t8S817fHd3L1VcydKYeADAJu8A-BhXvzPzbsw@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Jul 30, 2016 at 10:35 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Greg Stark <stark@mit.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 wouldn't mind fixing case sensitivity in the process...but I don't think we need to touch the GUC infrastructure at all.

For a product that has a reasonably high regard for the SQL standard I'd like to at least keep an open mind about other relevant standards - and if accommodation is as simple as writing a new function I'd see no reason to reject such a patch.​  pg_size_pretty never did seem like a good name for a function with its behavior...lets be open to accepting an improved version without a pg_ prefix.

We could even avoid a whole new function and add an "iB" template pattern to the to_char function - although I'm not sure that wouldn't be more confusing than helpful in practice.

David J.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)
Next
From: David Steele
Date:
Subject: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)