Re: jsonb contains behaviour weirdness - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: jsonb contains behaviour weirdness
Date
Msg-id CAM3SWZTh1mnAQ+a7HtWPmqcys6+GJcewNCqiSy2ftwW3xFAZQg@mail.gmail.com
Whole thread Raw
In response to Re: jsonb contains behaviour weirdness  (Josh Berkus <josh@agliodbs.com>)
Responses Re: jsonb contains behaviour weirdness  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
On Fri, Sep 12, 2014 at 11:21 AM, Josh Berkus <josh@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.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: jsonb contains behaviour weirdness
Next
From: Robert Haas
Date:
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)