Re: [PATCH] expand the units that pg_size_pretty supports on output - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: [PATCH] expand the units that pg_size_pretty supports on output
Date
Msg-id CAEZATCWTJcZjfqFFxJdTu+s11x1JjEM_CiiecmTny4tWLZEvdQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] expand the units that pg_size_pretty supports on output  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: [PATCH] expand the units that pg_size_pretty supports on output
List pgsql-hackers
On Thu, 8 Jul 2021 at 05:30, David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Thu, 8 Jul 2021 at 13:31, David Rowley <dgrowleyml@gmail.com> wrote:
> > It feels like if we're going to fix this negative rounding thing then
> > we should maybe do it and backpatch a fix then rebase this work on top
> > of that.

Yes, that was my thinking too.

> Here's a patch which I believe makes pg_size_pretty() and
> pg_size_pretty_numeric() match in regards to negative values.

LGTM, except I think it's worth also making the numeric code not refer
to bit shifting either.

> Maybe this plus your regression test would be ok to back-patch?

+1

Here's an update with matching updates to the numeric code, plus the
regression tests.

Regards,
Dean

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: ERROR: "ft1" is of the wrong type.
Next
From: Fabien COELHO
Date:
Subject: Re: rand48 replacement