From: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
---|---|
To: | fabriziomello(at)gmail(dot)com |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Does Type Have = Operator? |
Date: | 2016-05-12 18:28:35 |
Message-ID: | E34AEE59-C76B-4691-AEB1-4F79E6788821@justatheory.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On May 12, 2016, at 11:19 AM, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> wrote:
> Yeah.. it's ugly but you can do something like that:
I could, but I won’t, since this is pgTAP and users of the library might have defined their own json operators.
Andrew Dunstan has done the yeoman’s work of creating such operators, BTW:
https://bitbucket.org/adunstan/jsoncmp
Some might argue that it ought to compare JSON objects, effectively be the equivalent of ::jsonb = ::jsonb, rather than ::text = ::text. But as Andrew points out to me offlist, “if that's what they want why aren't they using jsonb in the first place?”
So I think that, up to the introduction of JSONB, it was important not to side one way or the other and put a JSON = operator in core. But now what we have JSONB, perhaps it makes sense to finally take sides and intoduce JSON = that does plain text comparison. Thoughts?
Best,
David
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2016-05-12 18:29:48 | Re: Use %u to print user mapping's umid and userid |
Previous Message | Fabrízio de Royes Mello | 2016-05-12 18:19:52 | Re: Does Type Have = Operator? |