Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGXLh-0001sE-5z for pgsql-bugs@arkaria.postgresql.org; Fri, 24 Jun 2016 20:05:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bGXLf-0000s7-FR for pgsql-bugs@arkaria.postgresql.org; Fri, 24 Jun 2016 20:05:07 +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.84_2) (envelope-from ) id 1bGXL1-00009c-E5 for pgsql-bugs@postgresql.org; Fri, 24 Jun 2016 20:04:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bGXKz-0001qW-4o for pgsql-bugs@postgresql.org; Fri, 24 Jun 2016 20:04:26 +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 u5OK4MVZ009336; Fri, 24 Jun 2016 16:04:22 -0400 From: Tom Lane To: Robert Haas cc: Daniel Newman , danielnewman@umich.edu, Postgres-Bugs Subject: Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column In-reply-to: References: <20160623162507.17237.39471@wrigleys.postgresql.org> <30648.1466701447@sss.pgh.pa.us> <10331.1466723337@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 24 Jun 2016 13:57:51 -0400" Date: Fri, 24 Jun 2016 16:04:22 -0400 Message-ID: <9335.1466798662@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Robert Haas writes: > On Thu, Jun 23, 2016 at 7:08 PM, Tom Lane wrote: >> We can either revert the aforesaid commit so far as it affects hash, >> or do something to break _hash_form_tuple's encapsulation of the >> hash-value-for-data substitution. I don't immediately see a non-messy >> way to do the latter. > Would it work to have something like _hash_form_tuple() except that > instead of returning an index tuple it would just return the Datum and > isnull flags and let the caller decide what to do with them? Yeah. Let's define it as a function that transforms input values/isnull arrays into output values/isnull arrays. It seems all right for the callers to know the latter are always of length 1, so they can be local variables in the callers. I'll go make it so. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs