Re: custom function for converting human readable sizes to bytes - Mailing list pgsql-hackers

From Robert Haas
Subject Re: custom function for converting human readable sizes to bytes
Date
Msg-id CA+TgmoZMbwq-Lb_E06pDXttUf9LhWu2q+7JLqev2nphbEvTFCg@mail.gmail.com
Whole thread Raw
In response to Re: custom function for converting human readable sizes to bytes  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: custom function for converting human readable sizes to bytes
Re: custom function for converting human readable sizes to bytes
Re: custom function for converting human readable sizes to bytes
List pgsql-hackers
On Mon, Jan 4, 2016 at 10:17 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> [ new patch ]

+         case '-':
+             ereport(ERROR,
+                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+                      errmsg("size cannot be negative")));

Why not?  I bet if you copy any - sign to the buffer, this will Just Work.

+         if ( conv->base_unit == GUC_UNIT_KB &&

Whitespace.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Some 9.5beta2 backend processes not terminating properly?
Next
From: Andres Freund
Date:
Subject: Re: Building pg_xlogdump reproducibly