Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJJd1-0003Jj-Lj for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 16:20:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJJd0-0008VP-EU for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 16:20:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJJd0-0008Uy-7G for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2020 16:20:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJJcy-0002aT-5H for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2020 16:20:37 +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 02VGKWwd009234; Tue, 31 Mar 2020 12:20:32 -0400 From: Tom Lane To: Alexey Bashtanov cc: pgsql-hackers@lists.postgresql.org Subject: Re: Less-silly selectivity for JSONB matching operators In-reply-to: <8fcbdcc5-cbed-f96f-7ed4-f34d1bd1a205@imap.cc> References: <12237.1582833074@sss.pgh.pa.us> <14469.1582927774@sss.pgh.pa.us> <8fcbdcc5-cbed-f96f-7ed4-f34d1bd1a205@imap.cc> Comments: In-reply-to Alexey Bashtanov message dated "Tue, 31 Mar 2020 16:55:13 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9232.1585671632.1@sss.pgh.pa.us> Date: Tue, 31 Mar 2020 12:20:32 -0400 Message-ID: <9233.1585671632@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexey Bashtanov writes: > The only little thing I can think of is hardcoding it as 2 * DEFAULT_EQ_SEL. > While I don't have any arguments against the value itself I think it > should be configurable independently. > Sadly DEFAULT_MATCH_SEL name is already taken for text patterns. > Not sure if it's a reason to rename all the stuff. Yeah, I was going to invent a symbol till I noticed that DEFAULT_MATCH_SEL was already taken :-(. There are only about half a dozen uses of that in-core, so maybe we could get away with renaming that one, but on the whole I'd rather leave it alone in case some extension is using it. So that leaves us with needing to find a better name for this new one. Any ideas? regards, tom lane