From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Geoghegan <pg(at)heroku(dot)com>, Дмитрий Долгов <9erthalion6(at)gmail(dot)com> |
Subject: | Re: jsonb - path |
Date: | 2015-06-10 19:35:10 |
Message-ID: | 22225.1433964910@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Future plans that might affect this issue: possible implementations of
> Json Pointer (rfc 6901), Json Patch (rfc 6902) and Json Merge Patch (rfc
> 7396). The last one is on this list for completeness - it seems to me a
> lot less useful than the others, but I included it because Peter felt
> strongly about the lack of recursive merge. Json Patch could probably
> stand on its owm once we have Json Pointer, so that's really the thing
> we need to talk about. Undeneath the hood, I think we could make
> json_pointer be simply an array of text. If we did that, we could make
> an implicit cast from text[] to it,
Implicit cross-type-category casts are almost always a bad idea.
Usually you don't find out how bad until after you've shipped it.
It's possible this would be okay, given the probable limited usage
of json_pointer. But I think it's darn risky to make decisions now
that are contingent on the assumption that such a cast won't have
untenable side-effects.
In particular, such a cast would create substantial hazards for any
operator that's named similarly to one of the json(b) operators and could
take a text array on the right. While there don't seem to be any of those
at the moment (at least not in core), this is certainly another good
reason not to use "-" as the jsonb_delete operator.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-06-10 19:46:46 | Re: s_lock() seems too aggressive for machines with many sockets |
Previous Message | Petr Jelinek | 2015-06-10 19:26:45 | Re: jsonb - path |