public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: David Rowley <[email protected]>
Cc: Justin Pryzby <[email protected]>
Cc: [email protected]
Subject: Re: Add support for unit "B" to pg_size_pretty()
Date: Tue, 7 Mar 2023 21:22:30 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvrCwMgSD_93LZr4CLMas8Hc61fXAQ-Cd4=+yoRfHnYbJA@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<CAApHDvrn9aznj=h1srcjyPpQVBA_B+d7izYvtUa-5ni+GZ7z0A@mail.gmail.com>
	<[email protected]>
	<CAApHDvpzxuo5F8-zbDoK7ZFmVjMbvVK3XQjNcZZuGcMhBc0V5w@mail.gmail.com>
	<[email protected]>
	<CAApHDvrCwMgSD_93LZr4CLMas8Hc61fXAQ-Cd4=+yoRfHnYbJA@mail.gmail.com>

On 06.03.23 09:27, David Rowley wrote:
> On Mon, 6 Mar 2023 at 21:13, Peter Eisentraut
> <[email protected]> wrote:
>>
>> On 02.03.23 20:58, David Rowley wrote:
>>> I think I'd prefer to see the size_bytes_unit_alias struct have an
>>> index into size_pretty_units[] array. i.e:
>>
>> Ok, done that way.  (I had thought about that, but I was worried that
>> that would be too error-prone to maintain.  But I suppose the tables
>> don't change that often, and test cases would easily catch mistakes.)
> 
> Patch looks pretty good. I just see a small spelling mistake in:
> 
> +/* Additional unit aliases acceted by pg_size_bytes */
> 
>> I also updated the documentation a bit more.
> 
> I see I must have forgotten to add PB to the docs when pg_size_pretty
> had that unit added.  I guess you added the "etc" to fix that?  I'm
> wondering if that's the right choice. You modified the comment above
> size_pretty_units[] to remind us to update the docs when adding units,
> but the docs now say "etc", so do we need to?  I'd likely have gone
> with just adding "PB" to the docs, that way it's pretty clear that new
> units need to be mentioned in the docs.

Ok, I have fixed the original documentation to that effect and 
backpatched it.

The remaining patch has been updated accordingly and committed also.







view thread (9+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Add support for unit "B" to pg_size_pretty()
  In-Reply-To: <[email protected]>

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

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