Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZhID-000337-KA for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Feb 2017 17:05:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cZhID-0005qm-7M for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Feb 2017 17:05:01 +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 1cZhI5-0005id-0b for pgsql-hackers@postgresql.org; Fri, 03 Feb 2017 17:04:53 +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 1cZhI2-0005Ux-Fe for pgsql-hackers@postgresql.org; Fri, 03 Feb 2017 17:04:52 +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 v13H4mGV025730; Fri, 3 Feb 2017 12:04:48 -0500 From: Tom Lane To: Robert Haas cc: "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: pageinspect: Try to fix some bugs in previous commit. In-reply-to: References: <16740.1486093251@sss.pgh.pa.us> <18461.1486094419@sss.pgh.pa.us> <19193.1486095398@sss.pgh.pa.us> <17873.1486135695@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 03 Feb 2017 11:35:14 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25728.1486141488.1@sss.pgh.pa.us> Date: Fri, 03 Feb 2017 12:04:48 -0500 Message-ID: <25729.1486141488@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Robert Haas writes: > So based on that theory, here's a patch. > ... > In short, this patch makes hashfuncs.c consistent about (1) using the > next wider signed type to report unsigned values and (2) using the > GetDatum macro that matches the SQL return type in width and > signedness. Objections? I haven't actually reviewed the patch, but your description of it sounds sane. One thing to think about is what will happen if someday we want to use 64-bit hash codes (a day I think is not that far away). It sounds like you've already chosen bigint for any output field that represents a hash code or a related value such as a mask ... but it wouldn't hurt to look through the fields with that in mind. 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