On 29/02/16 18:19, Dmitry Dolgov wrote:
 > I'd strongly prefer the jsonb_array_insert naming though
 > I don't think it's a good idea to use set when this is used on
object, I think that we should throw error in that case.

Well, I thought it's wrong to introduce different functions and
behaviour patterns for objects and arrays, because it's the one data
type after all. But it's just my opinion of course.

The problem I see with that logic is because we don't keep order of keys in the jsonb object the "insert" in the name will have misleading implications from the point of the user. Also it does not do anything for object that "set" doesn't do already, so why have two interfaces for doing same thing.

  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to