On Thu, Oct 24, 2019 at 8:52 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > I think a potential problem is creation of ambiguity where there was > none before.
I agree that's not nice, and it seems like a new name might be better. > Also, as the prototype implementation shows, it's not like you > can't get this functionality today ... you just need to cast > jsonb to text. Admittedly that's annoying and wasteful. I don't think that gives the same result, does it? For example: # select jsonb_object(array['foo'], array['[{"bar-bar": ["baz"]}]'::jsonb]); jsonb_object --------------------------------------- {"foo": "[{\"bar-bar\": [\"baz\"]}]"} You can see the values are JSON strings, not JSON arrays/objects/etc. Regards, Paul