Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSSRN-0000qN-1P for pgsql-committers@arkaria.postgresql.org; Fri, 22 Dec 2017 18:53:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSSRL-00036m-9c for pgsql-committers@arkaria.postgresql.org; Fri, 22 Dec 2017 18:53:03 +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 1eSSRL-00036c-4i for pgsql-committers@lists.postgresql.org; Fri, 22 Dec 2017 18:53:03 +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.89) (envelope-from ) id 1eSSRH-0003j6-Jv for pgsql-committers@postgresql.org; Fri, 22 Dec 2017 18:53:02 +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 vBMIqsU9004295; Fri, 22 Dec 2017 13:52:54 -0500 From: Tom Lane To: Andres Freund cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Use new overflow aware integer operations. In-reply-to: <20171222175225.3vaod42gv34l32wv@alap3.anarazel.de> References: <18169.1513958454@sss.pgh.pa.us> <20171222175225.3vaod42gv34l32wv@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 22 Dec 2017 09:52:25 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4293.1513968774.1@sss.pgh.pa.us> Date: Fri, 22 Dec 2017 13:52:54 -0500 Message-ID: <4294.1513968774@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2017-12-22 11:00:54 -0500, Tom Lane wrote: >> I do not think it is reasonable for these functions to not set the >> output variable at all in the overflow case; it is not their job >> to opine on whether the caller may use the result. > I don't agree. Please note that that the function's documentation > explicitly says "The content of *result is implementation defined in > case of overflow.". I will not accept an implementation that spews compiler warnings all over the place, which is what this one is doing. Please fix that, or else I will. regards, tom lane