Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WhoFw-0006ch-UT for pgsql-hackers@arkaria.postgresql.org; Tue, 06 May 2014 22:54:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WhoFw-0007bs-4Q for pgsql-hackers@arkaria.postgresql.org; Tue, 06 May 2014 22:54:36 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WhoFu-0007bj-K3 for pgsql-hackers@postgresql.org; Tue, 06 May 2014 22:54:34 +0000 Received: from smtp.pobox.com ([208.72.237.35]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WhoFn-0002Ao-5c for pgsql-hackers@postgresql.org; Tue, 06 May 2014 22:54:33 +0000 Received: from smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp0.pobox.com (Postfix) with ESMTP id 17D6415AD7; Tue, 6 May 2014 18:54:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=content-type :mime-version:subject:from:in-reply-to:date:cc:message-id :references:to; s=sasl; bh=Ql15MSmkXGvp6qBYXZt8+S8LsT0=; b=OEgZ8 ZgPVkOB2mCZYvZqSih9/rHTIYD+8fh8xIv0sCk8TnNBu9FzATg8lyYsNRRh7olFk d2BF3vq3pyM1+RSz7d1nA1XEDnpBK59uMP5XZnD941MVDBlVCLyf54K7juv56PMa ogkg8SdeKmvpup3PiM3gryxk9EvbJnoKLyzT3g= Received: from pb-smtp0.int.icgroup.com (unknown [127.0.0.1]) by pb-smtp0.pobox.com (Postfix) with ESMTP id 0BAFB15AD6; Tue, 6 May 2014 18:54:26 -0400 (EDT) Received: from dwhee-ma-2944.iovation.com (unknown [74.121.28.6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by pb-smtp0.pobox.com (Postfix) with ESMTPSA id 51CA115ACE; Tue, 6 May 2014 18:54:21 -0400 (EDT) Content-Type: multipart/signed; boundary="Apple-Mail=_15EA683F-5288-4690-AF9F-3992C21E1392"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) From: "David E. Wheeler" In-Reply-To: <29011.1399415977@sss.pgh.pa.us> Date: Tue, 6 May 2014 15:54:19 -0700 Cc: Peter Geoghegan , Bruce Momjian , Greg Stark , Robert Haas , Heikki Linnakangas , Andrew Dunstan , "pgsql-hackers@postgresql.org" Message-Id: <5EE1519A-7DF7-4EB0-B7EA-5492F5F53C63@justatheory.com> 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> <29011.1399415977@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.1874) X-Pobox-Relay-ID: 5E1CAB80-D571-11E3-A6E8-9CEB01674E00-76319746!pb-smtp0.pobox.com 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 --Apple-Mail=_15EA683F-5288-4690-AF9F-3992C21E1392 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 6, 2014, at 3:39 PM, Tom Lane wrote: > 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. The use of JSON will not be ideal -- not in this sense. For example, at = $work, we=92re using it in place of an EAV model. Hence most rows have = the same keys (or a subset of known keys). Or think of your favorite = JSON API: every call to http://api.pgxn.org/user/$username.json is going = to have a very similar structure. > 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? Fixing++ David --Apple-Mail=_15EA683F-5288-4690-AF9F-3992C21E1392 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJTaWgbAAoJEJLfYnT4yIHxfpEP/39UJeMdtrG+/5L8mmpKaviP QMYVnjDKkqUjU/8AEgvEakd84wMUJ9J55J02ece+h/ZkDVd1vgZK0BeoGjFxMHQk k2M+WEiIjDJuqrI4lk0xIVKUm/LFyPVLlIn8NtBIatP2a5kiXLbx/yTXjT4BHl3r YQTYsMcCcEsaKaorEBocCHNN23Ft23D6MvsPTKKrI2yxxZUaUsR3BbBrYH35M6nZ lrsOQrreoqRma0uzBoTMiG3fO+y5WokIzGimgDD3p7UUX5qiSoCeEgWPyLZPf3JA F33y8kkS3cbz2/h0e79Uk0/dvBUsZrSJ0ItEIx3FtCW9fHXqd9O+zmMeTFYkAaqB qdGdjI6xDj0VsPQbXUHPfpmBipkxvPlzajoJgNKgrwfOVSOVdtZ78W07WrmUsQ0/ PvYy8Ov1VUwaIwg7WVpvESfMKh4un/3TeR6/lUSzlYBa/zKVUoHvLb7hKqtMg9sc +5SUEoKLyU3FHEoFgvSHt0GEd4Ga11uawgmVYU0Vy6bXGf2vt+niOepmeaVoOGJY 1uK0/u4d6tOevxLTdfR5SiP5JoxS2aXfUfwTif94mkDnsSnn1gH66tyl1Wgjh9Dv obS+313FcY8niCePFNsH6sncOwOJv3Qj5QVGS2Rp5/mKaJzIfa8P/+aP2qsELJxb GnG+Q9ZyakSKx63IilzM =XrLA -----END PGP SIGNATURE----- --Apple-Mail=_15EA683F-5288-4690-AF9F-3992C21E1392--