Re: jsonb concatenate operator's semantics seem questionable

From: Catalin Iacob <iacobcatalin(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Geoghegan <pg(at)heroku(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Ryan Pedela <rpedela(at)datalanche(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Ilya Ashchepkov <koctep(at)gmail(dot)com>
Subject: Re: jsonb concatenate operator's semantics seem questionable
Date: 2015-05-18 20:19:34
Message-ID: CAHg_5go7BAE9dhyCtM5E1Q6F8U4xBXJAoMhvXnfzsaBhV3bfDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 18, 2015 at 9:03 PM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:

> So you're arguing that we shouldn't call the operation in question ||
> because it's pretty much the same, mutatis mutandis, as the hstore
> operation of the same name. You've lost me.
>

Hopefully this helps. Peter's argument, as I understand it is:

In hstore @> means unnested containment, in jsonb it means nested
containment. Therefore, when an hstore operator is applied to jsonb it gets
"nestedness" as jsonb is nested and adds that nestedness is an important
thing that sets it apart from hstore. Therefore, since || is unnested
concatenation in hstore, it should become nested concatenation for jsonb.

I don't know if the argument is strong enough but it does make some sense.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-05-18 20:21:54 Re: jsonb concatenate operator's semantics seem questionable
Previous Message Peter Geoghegan 2015-05-18 20:17:46 Re: jsonb concatenate operator's semantics seem questionable