From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Further issues with jsonb semantics, documentation |
Date: | 2015-06-22 18:54:38 |
Message-ID: | 558859EE.4080000@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 6/5/15 3:51 PM, Alvaro Herrera wrote:
> Jim Nasby wrote:
>> On 6/5/15 2:08 PM, Petr Jelinek wrote:
>>> That's a good point, and it won't get any better if/when we add the json
>>> point support in 9.6 since the syntax would be something like select
>>> jsonb '{"a":"1", "b":"2", "c": {"a": "2"}}' - '/c/a'; and we will again
>>> silently do nothing. That's going to cause bugs in applications using this.
>>
>> Yeah, this is a miniature version of the pain I've felt with variant: trying
>> to get sane casting for a data type that encompasses other types in current
>> Postgres is essentially impossible.
>
> I'm not sure this is the same problem. But anyway I think requiring
> explicit casts in this stuff is a good thing -- relying on implicit
> cast to text, when most useful behavior uses other types, seems bad.
I'm not sure I'm following, at least for jsonb. If there's only jsonb -
json_pointer operator, why shouldn't we be able to resolve it? I suspect
part of the answer to that problem is that we need to make the
resolution of unknown smarter, or perhaps somehow configurable.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-06-22 18:55:22 | Re: NULL passed as an argument to memcmp() in parse_func.c |
Previous Message | Piotr Stefaniak | 2015-06-22 18:45:00 | NULL passed as an argument to memcmp() in parse_func.c |