Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WillO-0002SS-6w for pgsql-hackers@arkaria.postgresql.org; Fri, 09 May 2014 14:27:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WillN-0001eJ-M7 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 May 2014 14:27:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WillM-0001eB-Kf for pgsql-hackers@postgresql.org; Fri, 09 May 2014 14:27:00 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WillJ-0008Rw-6E for pgsql-hackers@postgresql.org; Fri, 09 May 2014 14:27:00 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WillA-00006K-Rr; Fri, 09 May 2014 10:26:48 -0400 Date: Fri, 9 May 2014 10:26:48 -0400 From: Bruce Momjian To: Tom Lane Cc: Gavin Flower , "David E. Wheeler" , Greg Stark , Robert Haas , Heikki Linnakangas , Andrew Dunstan , Peter Geoghegan , "pgsql-hackers@postgresql.org" Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) Message-ID: <20140509142648.GD23254@momjian.us> References: <20140506212020.GK30817@momjian.us> <57E8AA44-F816-45F2-BB61-5A854FFB0A97@justatheory.com> <28554.1399414853@sss.pgh.pa.us> <20140508134701.GO30817@momjian.us> <5819.1399558614@sss.pgh.pa.us> <1888.1399588751@sss.pgh.pa.us> <20140509033405.GA23254@momjian.us> <536C550F.50108@archidevsys.co.nz> <18360.1399633457@sss.pgh.pa.us> <20140509135336.GC23254@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140509135336.GC23254@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.6 (--) 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 On Fri, May 9, 2014 at 09:53:36AM -0400, Bruce Momjian wrote: > On Fri, May 9, 2014 at 07:04:17AM -0400, Tom Lane wrote: > > Gavin Flower writes: > > > On 09/05/14 15:34, Bruce Momjian wrote: > > >> Looks good. I was thinking the jsonb_ops name could remain unchanged > > >> and the jsonb_hash_ops could be called jsonb_combo_ops as it combines > > >> the key and value into a single index entry. > > > > > If you have 'jsonb_combo_ops' - then surely 'jsonb_op' should be called > > > 'jsonb_xxx_ops', where the 'xxx' distinguishes that from > > > 'jsonb_combo_ops'? I guess, if any appropriate wording of 'xxx' was too > > > cumbersome, then it would be worse. > > > > Yeah, I'm disinclined to change the opclass names now. It's not apparent > > to me that "combo" is a better choice than "hash" for the second opclass. > > Well, if we are optionally hashing json_ops for long strings, what does > jsonb_hash_ops do uniquely with hashing? Does it always hash, while > json_ops optionally hashes? Is that the distinguishing characteristic? > It seemed the _content_ of the indexed value was more important, rather > than the storage method. Also, are people going to think that jsonb_hash_ops creates a hash index, which is not crash safe, even though it is a GIN index? Do we have this "hash" confusion anywhere else? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers