Re: jsonb contains behaviour weirdness

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonb contains behaviour weirdness
Date: 2014-09-12 18:38:02
Message-ID: CAM3SWZTh1mnAQ+a7HtWPmqcys6+GJcewNCqiSy2ftwW3xFAZQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 12, 2014 at 11:21 AM, Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-09-12 18:38:58 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Tom Lane 2014-09-12 18:34:23 Re: jsonb contains behaviour weirdness