Re: jsonb and nested hstore

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: jsonb and nested hstore
Date: 2014-02-25 17:38:50
Message-ID: 530CD52A.4000209@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/25/2014 08:13 AM, Robert Haas wrote:
> I think you've got your head stuck deeply in the sand. The json data
> type works exactly like the xml data type has always worked. There
> have been occasional noises about making an xmlb data type, but
> nobody's minded enough to do anything about it, or at least not in
> this forum. So if the json data type has no future and is crap, then
> the same presumably holds of the xml data type. But I don't think
> anyone here believes that, unless they just hate xml on general
> principle, which I can certainly understand.

Well, if we had an XMLB, I would in fact be making the same argument.
I'll point out the only reason we're keeping the original json instead
of forcing an upgrade to jsonb, per earlier discussions, is
backwards-compatibility. If we had never had a json-text, and Merlin
was proposing adding one now alongside jsonb, I'd be arguing against
doing so.

> In short, I think you're viewing everything about jsonb with
> rose-colored glasses on, and that your enthusiasm is mostly wishful
> thinking. Will there be good things about jsonb? Of course. Will
> lots of people want to use it for those reasons? Very likely. Will
> it be better than json in all ways and for all purposes? No, and
> implying the contrary is just plain wrong.

It hurts our adoption substantially to confuse developers. We need to
recommend one type over the other, hence "Use jsonb unless you need X".
Merlin is pushing the type of multivariable comparison where *I*
wouldn't be able to make sense of which one I should pick, let alone
some web developer who's just trying to get a site built. That sort of
thing *really* doesn't help our users.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-02-25 17:39:34 Re: [PATCH] Use MAP_HUGETLB where supported (v3)
Previous Message Robert Haas 2014-02-25 17:37:23 Re: Patch: show xid and xmin in pg_stat_activity and pg_stat_replication