Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Who1d-00063D-Py for pgsql-hackers@arkaria.postgresql.org; Tue, 06 May 2014 22:39:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Who1d-0002QE-AY for pgsql-hackers@arkaria.postgresql.org; Tue, 06 May 2014 22:39:49 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Who1c-0002Q6-BK for pgsql-hackers@postgresql.org; Tue, 06 May 2014 22:39:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Who1Z-0001sz-S6 for pgsql-hackers@postgresql.org; Tue, 06 May 2014 22:39:47 +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 s46Mdb37029012; Tue, 6 May 2014 18:39:37 -0400 From: Tom Lane To: Peter Geoghegan cc: "David E. Wheeler" , Bruce Momjian , Greg Stark , Robert Haas , Heikki Linnakangas , Andrew Dunstan , "pgsql-hackers@postgresql.org" Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) In-reply-to: References: <534475B7.6020908@dunslane.net> <5344EAA4.1050605@vmware.com> <30137.1397057056@sss.pgh.pa.us> <20140422223230.GL10046@momjian.us> <16527.1398214220@sss.pgh.pa.us> <20140506201048.GI30817@momjian.us> <16769.1399407530@sss.pgh.pa.us> <20140506212020.GK30817@momjian.us> <57E8AA44-F816-45F2-BB61-5A854FFB0A97@justatheory.com> <28554.1399414853@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Tue, 06 May 2014 15:29:40 -0700" Date: Tue, 06 May 2014 18:39:37 -0400 Message-ID: <29011.1399415977@sss.pgh.pa.us> 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 Peter Geoghegan writes: > On Tue, May 6, 2014 at 3:20 PM, Tom Lane wrote: >> I wonder whether the most effective use of time at this point >> wouldn't be to fix jsonb_ops to do that, rather than arguing about >> what to rename it to. If it didn't have the failure-for-long-strings >> problem I doubt anybody would be unhappy about making it the default. > I would expect the selectivity of keys on their own to be very low > with idiomatic usage of jsonb. Typically, every row in a table will > have almost the same keys. The current default opclass makes more > sense for when that isn't the case. Meh. I would not think that that represents effective use of JSON: if the rows are all the same, why aren't you exposing that structure as regular SQL columns? IMHO, the value of JSON fields within a SQL table is to deal with data that is not so well structured. In any case, it was certainly the complaint that insertions might fail altogether that made me (and I assume others) want to not have jsonb_ops as the default opclass. Is there a good reason not to fix that limitation while we still can? 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