Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXo3s-0005L1-R9 for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Apr 2014 08:40:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXo3s-0005Ls-1W for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Apr 2014 08:40:48 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXo3q-0005Lj-Ln for pgsql-hackers@postgresql.org; Wed, 09 Apr 2014 08:40:46 +0000 Received: from mail-ob0-f169.google.com ([209.85.214.169]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXo3k-0000rl-65 for pgsql-hackers@postgresql.org; Wed, 09 Apr 2014 08:40:45 +0000 Received: by mail-ob0-f169.google.com with SMTP id va2so2357604obc.0 for ; Wed, 09 Apr 2014 01:40:39 -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=X2VvS6aJ0Q2Uh40uh2Sfv69N3EnlBRyS/ye6ZT3IiEg=; b=Eh30g8bBFuozT0PhaQpt/JebAC6/tjkSC+mwCLpT3IbHCPpYQ5uPJpT0Q6pZYoqBvU vY3OnNNMxpvfWdzsfQxTAJ+KkTWJ8w7PVDUz6zwyeDwrLJFCD5jSpkk6pcdOwVzBO9VW veXMeq3GU9YZlLZzEmJgGxW2NOYGVNUrcXgBn+TqflMuJOC9sQec5py8EQGIIMprmo3T FK8xV3tgC1LG4FwaaEppuBPKsjeWgComyB70fEXikpH5TtbsCBNR69zpq5Ug1YnAlYf5 bzVJWbEBoHGPJ7yw6tyIpSqKOEiocqUd92ZMX9sZXVeqyr4ei6wMUZJlTIhYvNdn3Rch 8bUg== X-Gm-Message-State: ALoCoQnoHsu6ukuAXi7qIExsI/bF2NUnmZBDnaO6glJcm+o0ZflIqsQxDBuo7T/fWRgHVunVJYX8 MIME-Version: 1.0 X-Received: by 10.182.118.169 with SMTP id kn9mr7741842obb.46.1397032839294; Wed, 09 Apr 2014 01:40:39 -0700 (PDT) Received: by 10.182.233.228 with HTTP; Wed, 9 Apr 2014 01:40:39 -0700 (PDT) In-Reply-To: <53450306.8040104@vmware.com> References: <27299.1396989666@sss.pgh.pa.us> <28589.1396992841@sss.pgh.pa.us> <29030.1396993582@sss.pgh.pa.us> <534475B7.6020908@dunslane.net> <5344EAA4.1050605@vmware.com> <53450306.8040104@vmware.com> Date: Wed, 9 Apr 2014 01:40:39 -0700 Message-ID: Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) From: Peter Geoghegan To: Heikki Linnakangas Cc: Andrew Dunstan , Tom Lane , 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 Wed, Apr 9, 2014 at 1:21 AM, Heikki Linnakangas wrote: > I didn't say that. On the contrary, I think the shotgun approach jsonb_ops > and jsonb_hash_ops take is too broad. It should be possible to specify what > to index in a more detailed fashion. It is - use an expression index. That's by far the most important way to specify what to index in a more detailed fashion. There are others, but that's the major one. Beyond that, yes, it's necessary to carefully write your query predicate a certain way. However, a similar situation exists in MongoDB, where there is a distinction between "Indexes on embedded fields" (which must be accessed using special "dot notation") and "indexes on subdocuments" (which cannot be accessed using "dot notation"). It's late here, but I'm pretty sure that's a feature and not a limitation. -- 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