Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wilqe-0002gM-Ak for pgsql-hackers@arkaria.postgresql.org; Fri, 09 May 2014 14:32:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wilqd-0005BC-Fj for pgsql-hackers@arkaria.postgresql.org; Fri, 09 May 2014 14:32:27 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wilqa-000589-LP for pgsql-hackers@postgresql.org; Fri, 09 May 2014 14:32:24 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WilqX-0003nV-G4 for pgsql-hackers@postgresql.org; Fri, 09 May 2014 14:32:24 +0000 Received: from anarazel.de (p5DDC7C93.dip0.t-ipconnect.de [93.220.124.147]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0MCT7F-1WaDFj02Cn-0097Or; Fri, 09 May 2014 16:32:02 +0200 Received: by anarazel.de (Postfix, from userid 1000) id 51CC7101A03; Fri, 9 May 2014 16:32:01 +0200 (CEST) Date: Fri, 9 May 2014 16:32:01 +0200 From: Andres Freund To: Bruce Momjian Cc: Tom Lane , 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: <20140509143201.GF30231@awork2.anarazel.de> References: <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> <20140509142648.GD23254@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140509142648.GD23254@momjian.us> X-Provags-ID: V02:K0:sk4ydEj5WHIYoE87sxvW6AAUgXrN7j+SijnIICJzGm5 se0pichx029OCBuzdQUGviB6ipjJhU9/NW3RzJZPu3GghMJXcX e9Zq6jOToiMRdsZov8iKdWOEZE4FKTYNBaGFxs6X4cIF1dGYcJ zfA/k8hkK1bqf79wZovB4nqoRzLbHiZ2Zzn2zpkN2xKj/FKNZG v8TwfbYv4ltbMIOZBzowsYN+mXrilbnPLxd4yuoa+ZRAmiog6S JpmRWMdpDcbCDQPKNSLqI6gQRbe+6vh+6D4mrBge+g8dX0aqHa RMoq4m2iQdDIK2iTO0cR3VEEFZ0xZ3dZY6ULg9K5wUcScXrNXJ 8tKgPhMqslc1AY3M+42T7ZCwLF6RTJBLsFrZ/y6UC 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 On 2014-05-09 10:26:48 -0400, Bruce Momjian wrote: > 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? The operator class has to be specified after the USING GIN in CREATE INDEX so I think that rest is neglegible. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers