Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXtxP-0004cF-00 for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Apr 2014 14:58:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXtxN-0007VP-Iw for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Apr 2014 14:58:29 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXtx8-0007AM-Fu for pgsql-hackers@postgresql.org; Wed, 09 Apr 2014 14:58:14 +0000 Received: from mail-qa0-x22c.google.com ([2607:f8b0:400d:c00::22c]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXtx5-0007U9-NZ for pgsql-hackers@postgresql.org; Wed, 09 Apr 2014 14:58:13 +0000 Received: by mail-qa0-f44.google.com with SMTP id hw13so2558269qab.3 for ; Wed, 09 Apr 2014 07:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=svjBw8Pzn2gOk0RVmOyReLuBcEuEMQrlF4b8ZklX++Q=; b=sHWOEHL51AbZJDJO0sxGXI8TDF/Oytu90YAIIrWaWhDua/Xp+9RgpAX5qCpH/ZpiUh 6Zjg8bGnWdlMW32T/IlPSVvhsGATe35w/ubDmizMGJ4/10azJLiLSMNXJKEOsJjWkSy6 YSZD69lYvJ+fZl0hxUtrvG73Jyw/IaDuQ5iT+OcXYM+FuimqysHpRZeRKXxfwvtmSu8F p1ZGjkkOvhN/TRn4qL07YmvWjGfORsPfibp8/nP6OrpXgDb1e6twZlBWTuhS5UhccOHT +i/ofWrlogSIfuY/RyEsoN/Umf03FszbQmU68nhh15HkjAIoURrIj60wNqZmSmliMY1B 2HCQ== X-Received: by 10.224.36.194 with SMTP id u2mr12784635qad.73.1397055490862; Wed, 09 Apr 2014 07:58:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.75.201 with HTTP; Wed, 9 Apr 2014 07:57:50 -0700 (PDT) In-Reply-To: <5344EAA4.1050605@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> From: Alexander Korotkov Date: Wed, 9 Apr 2014 18:57:50 +0400 Message-ID: Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) To: Heikki Linnakangas Cc: Andrew Dunstan , Peter Geoghegan , Tom Lane , pgsql-hackers Content-Type: multipart/alternative; boundary=001a11c2a24043b44604f69d5452 X-Pg-Spam-Score: -2.0 (--) 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 --001a11c2a24043b44604f69d5452 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Apr 9, 2014 at 10:37 AM, Heikki Linnakangas wrote: > The ship has cleatly sailed to add parameterized opclasses to 9.4, but > let's keep it in mind when we decide on the defaults. > > In the absence of parameterizable opclasses, it would be much more > flexible to have opclasses that index, keys, values, key-value pairs and > paths separately, instead of the current json_ops and json_hash_ops > opclasses which index all of those in the same index. That way, if you only > e.g. ever query on the existence of a key, you'd only need to index the > keys. > > I don't understand how we ended up with the current dichotomy of json_ops > and json_hash_ops... +1 for parameterizable opclasses ------ With best regards, Alexander Korotkov. --001a11c2a24043b44604f69d5452 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On W= ed, Apr 9, 2014 at 10:37 AM, Heikki Linnakangas <hlinnakangas@vmware= .com> wrote:
The ship has cleatly sailed to add paramet= erized opclasses to 9.4, but let's keep it in mind when we decide on th= e defaults.

In the absence of parameterizable opclasses, it would be much more flexible= to have opclasses that index, keys, values, key-value pairs and paths sepa= rately, instead of the current json_ops and json_hash_ops opclasses which i= ndex all of those in the same index. That way, if you only e.g. ever query = on the existence of a key, you'd only need to index the keys.

I don't understand how we ended up with the current dichotomy of json_o= ps and json_hash_ops...

+1 for parameterizable opclasses

------ With best regards,
Alexander Korotkov.
--001a11c2a24043b44604f69d5452--