On Fri, Sep 12, 2014 at 10:38 PM, Peter Geoghegan <p...@heroku.com> wrote:
> On Fri, Sep 12, 2014 at 11:21 AM, Josh Berkus <j...@agliodbs.com> wrote: > >> # select '[1,1,2]'::jsonb @> '[1,2,2]'::jsonb; > >> ?column? > >> ---------- > >> t > >> (1 row) > >> > >> But, it's not. Jsonb contains takes care only about length of array. > > > > OK, now, that's messed up. > > To be clear: I don't think that this example is messed up (in > isolation). I think it's the correct behavior. What I find > objectionable is the inconsistency. I believe that this is Alexander's > concern too. Alexander's first example exhibits broken behavior. > Agree. I just tried to explain how current behaviour could look for user who sees it for the first time. ------ With best regards, Alexander Korotkov.