pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: amborodin@acm.org
To: Andrew Borodin <borodin@octonica.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Optimizing numeric SUM() aggregate
Date: Wed, 27 Jul 2016 08:32:42 -0400
Message-ID: <28450.1469622762@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJEAwVGMbqamZvzd+xKF4i92benSeze6_jg0ikfuGVX-fHQkBA@mail.gmail.com>
References: <c0545351-a467-5b76-6d46-4840d1ea8aa4@iki.fi>
	<CAJEAwVGNmZccOv91sNC+oX+Y4rtJRvsfzJO=h-jj=-Mrfckodw@mail.gmail.com>
	<CAJEAwVE-sDR_ZuQ8uKY2HW8L3TSsuEoO7qoKwcjyeR50BXfvEw@mail.gmail.com>
	<CAEZATCUQU6sL54bGZ3y4z11wVWpD8bTVt1i2p2AFSRL+CuxzQw@mail.gmail.com>
	<CAJEAwVGMbqamZvzd+xKF4i92benSeze6_jg0ikfuGVX-fHQkBA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andrew Borodin <borodin@octonica.com> writes:
>> I don't think there is any reason for this new code to assume NBASE=10000

> There is a comment on line 64 stating that value 10000 is hardcoded
> somewhere else, any other value is not recommended and a bunch of code
> is left for historical reasons.

Doesn't matter: please use NBASE when you mean NBASE.  10000 is just a
magic number, and therefore bad coding style.  For that matter, spelling
INT_MAX as 0x7FFFFFF is also not per project style.

			regards, tom lane


-- 
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: <28450.1469622762@sss.pgh.pa.us>
Permalink:  ../28450.1469622762@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28450.1469622762@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amborodin@acm.org, borodin@octonica.com, dean.a.rasheed@gmail.com, hlinnaka@iki.fi
  Subject: Re: Optimizing numeric SUM() aggregate
  In-Reply-To: <28450.1469622762@sss.pgh.pa.us>
  References: <c0545351-a467-5b76-6d46-4840d1ea8aa4@iki.fi> <CAJEAwVGNmZccOv91sNC+oX+Y4rtJRvsfzJO=h-jj=-Mrfckodw@mail.gmail.com> <CAJEAwVE-sDR_ZuQ8uKY2HW8L3TSsuEoO7qoKwcjyeR50BXfvEw@mail.gmail.com> <CAEZATCUQU6sL54bGZ3y4z11wVWpD8bTVt1i2p2AFSRL+CuxzQw@mail.gmail.com> <CAJEAwVGMbqamZvzd+xKF4i92benSeze6_jg0ikfuGVX-fHQkBA@mail.gmail.com> <28450.1469622762@sss.pgh.pa.us>

* 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