Re: BUG #12989: pg_size_pretty with negative values - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #12989: pg_size_pretty with negative values
Date
Msg-id CAKFQuwYA8qL32EChKxQWrV5eYTPsC0CbJrAOXuUYM3seqvdYuQ@mail.gmail.com
Whole thread Raw
In response to BUG #12989: pg_size_pretty with negative values  (cbalmeida@gmail.com)
Responses Re: BUG #12989: pg_size_pretty with negative values  (Christian Almeida <cbalmeida@gmail.com>)
List pgsql-bugs
On Mon, Apr 6, 2015 at 10:30 AM, <cbalmeida@gmail.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      12989
> Logged by:          Christian Almeida
> Email address:      cbalmeida@gmail.com
> PostgreSQL version: 9.3.6
> Operating system:   Ubuntu 14.04 LTS
> Description:
>
> The function "pg_size_pretty" is not formatting negative numbers.
>
>
> Example:
> select pg_size_pretty(+123456789::bigint),
> pg_size_pretty(-123456789::bigint)
>
> Output:
> ----------------------------
> 118 MB      -123456789 bytes
>
>
Do you want the result to be "-118 MB" or "ERROR: invalid input - size
cannot be negative (-123456789)"?

David J.

pgsql-bugs by date:

Previous
From: cbalmeida@gmail.com
Date:
Subject: BUG #12989: pg_size_pretty with negative values
Next
From: Christian Almeida
Date:
Subject: Re: BUG #12989: pg_size_pretty with negative values