Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WjIcG-0004ep-I9 for pgsql-hackers@arkaria.postgresql.org; Sun, 11 May 2014 01:31:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WjIcF-0002rT-Ie for pgsql-hackers@arkaria.postgresql.org; Sun, 11 May 2014 01:31:47 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WjIcD-0002rI-21 for pgsql-hackers@postgresql.org; Sun, 11 May 2014 01:31:45 +0000 Received: from mail-oa0-f47.google.com ([209.85.219.47]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WjIc5-0007T2-81 for pgsql-hackers@postgresql.org; Sun, 11 May 2014 01:31:43 +0000 Received: by mail-oa0-f47.google.com with SMTP id i7so6686828oag.34 for ; Sat, 10 May 2014 18:31:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0z4YHLlR2s6f1Zn6bqMKI1GSFmLu/Kz/Wqb3Rhhx6u4=; b=Cyk4EeO54xF7hUlVE0PouEEWzQFa/79sV8aQFZF+ZoSdHlrxVBrOzvi4hIW+c+g+KG kNAs5oUpmn8xFfi4QTqJihCJAIw227aOa5nLC31l2bRcyJtARzgBnPlgGs2EkmyrvbGK TtSplSLP9Pc+kWwKIyDFhSA7ichRjdAVncd5yllMQ7PgDx8JXORniJiP6vvq6NgjNA6J dCv7wFrZxlc5h6a28nQO3bCIgVfvy0Jg9bPPcVgFI5vbAucbxpLsoZxfteBJHG2Mv8Z7 3hV8lBlOdupVJgBHwoX/lWwNWGp/sKmC0WbReKkP6h2cQw0hSHMgAAhOSoWyUbO/ihUT /vaw== X-Gm-Message-State: ALoCoQk51DuMqBi3uVugPI6Xrd1AJ8Kl00maYLuFc4QZFOVz7RxRGReVQXXtRi8Bu9NtDubvLith MIME-Version: 1.0 X-Received: by 10.182.165.134 with SMTP id yy6mr24025155obb.5.1399771896097; Sat, 10 May 2014 18:31:36 -0700 (PDT) Received: by 10.182.176.67 with HTTP; Sat, 10 May 2014 18:31:35 -0700 (PDT) In-Reply-To: <4986.1399769673@sss.pgh.pa.us> References: <16769.1399407530@sss.pgh.pa.us> <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> <28961.1399668272@sss.pgh.pa.us> <536E8F3A.40706@vmware.com> <4986.1399769673@sss.pgh.pa.us> Date: Sat, 10 May 2014 18:31:35 -0700 Message-ID: Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) From: Peter Geoghegan To: Tom Lane Cc: Heikki Linnakangas , Greg Stark , Bruce Momjian , Gavin Flower , "David E. Wheeler" , Robert Haas , Andrew Dunstan , "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset=UTF-8 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 Sat, May 10, 2014 at 5:54 PM, Tom Lane wrote: > I'm not sure whether we have consensus to rename jsonb_hash_ops to > jsonb_path_ops, but since time is so short I went ahead and made a draft > patch to do so (attached). Probably the most interesting part of this is > the new text in json.sgml explaining the difference between the two > opclasses. I also added a paragraph about the empty-query hazard that > Peter mentions. Do people think this discussion is correct and useful? I for one am fine with the name change you propose. > + especially if > + there are a very large number of rows containing any single one of the > + three keys I suggest that you phrase this as "three index items". > + A disadvantage of the jsonb_path_ops approach is > + that it produces no index entries for JSON structures not containing > + any values, such as {"a": {}}. If a search for I suggest "any values or elements". Even though I previously called hashing an implementation detail, we are bound to have to mention it in passing when discussing the limitations of jsonb_hash_ops/jsonb_path_ops. I think that you should proceed with committing the entire patch, including the doc changes that discuss implementation details around the two GIN opclasses. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers