Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSO2n-00050j-Kd for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Jul 2016 12:34:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bSO2n-0006AC-2V for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Jul 2016 12:34:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bSO1R-0004aM-LN for pgsql-hackers@postgresql.org; Wed, 27 Jul 2016 12:33:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bSO1N-0006ma-AO for pgsql-hackers@postgresql.org; Wed, 27 Jul 2016 12:33:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6RCWgod028451; Wed, 27 Jul 2016 08:32:42 -0400 From: Tom Lane To: amborodin@acm.org, Andrew Borodin cc: Dean Rasheed , Heikki Linnakangas , pgsql-hackers Subject: Re: Optimizing numeric SUM() aggregate In-reply-to: References: Comments: In-reply-to Andrew Borodin message dated "Wed, 27 Jul 2016 14:17:51 +0500" Date: Wed, 27 Jul 2016 08:32:42 -0400 Message-ID: <28450.1469622762@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andrew Borodin 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