pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <julien.rouhaud@dalibo.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Adrian.Vondendriesch <Adrian.Vondendriesch@credativ.de>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Christian Almeida <cbalmeida@gmail.com>
Subject: Re: [BUGS] BUG #12989: pg_size_pretty with negative values
Date: Tue, 3 Nov 2015 12:18:37 +0100
Message-ID: <5638980D.9010103@dalibo.com> (raw)
In-Reply-To: <CA+TgmoZZyTsnKmxLeWbnJcKXjQaX0zUL0X5Jg97JFU__naoOmw@mail.gmail.com>
References: <20150406173026.2550.39773@wrigleys.postgresql.org>
	<CAKFQuwYA8qL32EChKxQWrV5eYTPsC0CbJrAOXuUYM3seqvdYuQ@mail.gmail.com>
	<CA+EGHNCehGS-rKpLMB=CK=YEPcrZTmOcMWzOy=Pqse9Mv7MWYQ@mail.gmail.com>
	<CAKFQuwbYY0sOcTStnjrwNBmzWcFP+vjK36VtTyx5TUX+Pi32ZA@mail.gmail.com>
	<31955.1428346338@sss.pgh.pa.us>
	<55FEA38F.40301@credativ.de>
	<56350782.3040400@dalibo.com>
	<CA+TgmoZZyTsnKmxLeWbnJcKXjQaX0zUL0X5Jg97JFU__naoOmw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 03/11/2015 04:06, Robert Haas wrote:
> On Sat, Oct 31, 2015 at 2:25 PM, Julien Rouhaud
> <julien.rouhaud@dalibo.com> wrote:
>> I just reviewed your patch, everything looks fine for me. Maybe some
>> minor cosmetic changes could be made to avoid declaring too many vars,
>> but I think a committer would have a better idea on this, so I mark
>> this patch as ready for committer.
> 
> I don't think we should define Sign(x) as a macro in c.h. c.h is
> really only supposed to contain stuff that's pretty generic and
> universal, and the fact that we haven't needed it up until now
> suggests that Sign(x) isn't.  I'd suggest instead defining something
> like:
> 
> #define half_rounded(x)   (((x) + (x) < 0 ? 0 : 1) / 2)
> 
> Maybe rename numeric_divide_by_two to numeric_half_rounded.
> Generally, let's try to make the numeric and int64 code paths look as
> similar as possible.
> 
> Recomputing numeric_absolute(x) multiple times should be avoided.
> Compute it once and save the answer.
> 

Thanks for these comments. I therefore change the status to waiting on
author.

Regards.

-- 
Julien Rouhaud
http://dalibo.com - http://dalibo.org


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (13+ messages)  latest in thread

Message-ID: <5638980D.9010103@dalibo.com>
Permalink:  ../5638980D.9010103@dalibo.com/
Also on:    postgresql.org/message-id/5638980D.9010103@dalibo.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: julien.rouhaud@dalibo.com, robertmhaas@gmail.com, Adrian.Vondendriesch@credativ.de, pgsql-hackers@postgresql.org, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, cbalmeida@gmail.com
  Subject: Re: [BUGS] BUG #12989: pg_size_pretty with negative values
  In-Reply-To: <5638980D.9010103@dalibo.com>
  References: <20150406173026.2550.39773@wrigleys.postgresql.org> <CAKFQuwYA8qL32EChKxQWrV5eYTPsC0CbJrAOXuUYM3seqvdYuQ@mail.gmail.com> <CA+EGHNCehGS-rKpLMB=CK=YEPcrZTmOcMWzOy=Pqse9Mv7MWYQ@mail.gmail.com> <CAKFQuwbYY0sOcTStnjrwNBmzWcFP+vjK36VtTyx5TUX+Pi32ZA@mail.gmail.com> <31955.1428346338@sss.pgh.pa.us> <55FEA38F.40301@credativ.de> <56350782.3040400@dalibo.com> <CA+TgmoZZyTsnKmxLeWbnJcKXjQaX0zUL0X5Jg97JFU__naoOmw@mail.gmail.com> <5638980D.9010103@dalibo.com>

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

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