Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez5Ke-0004A9-5U for pgsql-committers@arkaria.postgresql.org; Thu, 22 Mar 2018 18:53:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ez5Kc-0006Ib-Ib for pgsql-committers@arkaria.postgresql.org; Thu, 22 Mar 2018 18:52:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez5Kc-0006IS-71 for pgsql-committers@lists.postgresql.org; Thu, 22 Mar 2018 18:52:58 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ez5KY-0003mt-Gb for pgsql-committers@lists.postgresql.org; Thu, 22 Mar 2018 18:52:56 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id C089521C39AF; Thu, 22 Mar 2018 21:52:51 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from zilders-MacBook-Pro.local (unknown [94.29.3.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 5CBAF21C3962; Thu, 22 Mar 2018 21:52:51 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1521744771; bh=qMCZSQaYRmS7pTRI9rYPxOuhCzuCAyo1TfyAAk2ESns=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=Y0LvZ/n3X0Azko+wpsQCoRmN1nY1++C3RekmrnAbrruR78XjxA4gazSQ8TfSzRsFL AFA1ztkrMUSQYpc/zEtYMnd9NkW5vdxaJfBO/8eXN+TFamw83t9s/dSRRm/wvYPQDv t9TAeb8YOrK7T2gZu59zqUAQQooV6MV8P7VnQ+6s= Subject: Re: pgsql: Add general purpose hasing functions to pgbench. To: Fabien COELHO , Teodor Sigaev Cc: Tom Lane , pgsql-committers@lists.postgresql.org References: <2576.1521732754@sss.pgh.pa.us> From: Ildar Musin Message-ID: <96ddca3b-3f30-4fd8-1ad2-205dcd93154e@postgrespro.ru> Date: Thu, 22 Mar 2018 21:52:48 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Language: ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello all, 22/03/2018 19:31, Fabien COELHO пишет: >>> >>> Looks to me like the constants need to be written with INT64CONST(). >>> Also, the fact that the added regression test is passing makes me >>> wonder whether it's actually exercising these functions meaningfully. > > I think that there is at least some coverage > (https://coverage.postgresql.org/src/bin/pgbench/pgbench.c.gcov.html) > and the function results are also checked for some values in the perl > script output. > As Fabien said output values for some particular inputs are checked in tests. The fact that test passed apparently shows that compiler is smart enough to recognize those constants as 'long long' and use them accordingly in expressions. -- Ildar Musin Postgres Professional: http://www.postgrespro.com Russian Postgres Company