Re: Does Type Have = Operator? - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Does Type Have = Operator?
Date
Msg-id ad91feb3-62a4-dbcd-6bcf-9c5609388276@BlueTreble.com
Whole thread Raw
In response to Re: Does Type Have = Operator?  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: Does Type Have = Operator?  ("David E. Wheeler" <david@justatheory.com>)
List pgsql-hackers
On 5/12/16 4:25 PM, David E. Wheeler wrote:
> On May 12, 2016, at 12:02 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> Andrew mentions in the extension you pointed to that providing a default
>> comparison operator would enable people to do UNION, DISTINCT, etc on JSON
>> columns without thinking about it.  I'm not convinced that "without
>> thinking about it" is a good thing here.  But if we were going to enable
>> that, I'd feel better about making it default to jsonb semantics ...
>
> If you want the JSONB semantics, why wouldn’t you use JSONB instead of JSON?

Probably in an attempt to bypass parse overhead on ingestion.

Possibly because JSONB silently eats duplicated keys while JSON doesn't 
(though in that case even casting to JSONB is probably not what you want).
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: 10.0
Next
From: Jim Nasby
Date:
Subject: Re: Does Type Have = Operator?