On Fri, Jun 5, 2015 at 1:05 PM, Andrew Dunstan <and...@dunslane.net> wrote: > So probably the least invasive change would be to rename the text[] variant > operator to something like "#-" and rename the corresponding function to > jsonb_delete_path. > > We could also decide not to keep an operator at all, on the ground that we > think we'll implement a type that encapsulates json pointer in 9.6, and just > keep the renamed function.
Obviously I prefer the latter option, but the former is still an improvement. To repeat myself, ambiguities around operators are not the only problem: It seems no good to me that there is no way to accomplish an equivalent outcome to that shown below with the similarly-spelled operator you talk about (that is, the operator currently spelled "operator jsonb - text[]"): postgres=# select '["a", "c", "a"]'::jsonb - 'a'; ?column? ---------- ["c"] (1 row) With the operator currently spelled "operator jsonb - text[]", at the very least you have to do this instead: postgres=# select '["a", "c", "a"]'::jsonb - '{0}'::text[] - '{1}'::text[]; ?column? ---------- ["c"] (1 row) If nothing else, these operators are too dissimilar for overloading to be helpful. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers