Re: jsonb contains behaviour weirdness
От | Josh Berkus |
---|---|
Тема | Re: jsonb contains behaviour weirdness |
Дата | |
Msg-id | 54186FE0.40004@agliodbs.com обсуждение исходный текст |
Ответ на | jsonb contains behaviour weirdness (Alexander Korotkov <aekorotkov@gmail.com>) |
Список | pgsql-hackers |
On 09/15/2014 11:12 AM, Tom Lane wrote: >> Or are you proposing that JSONARRAY @> JSONARRAY should work differently >> from ARRAY @> ARRAY? > > And no. It's a bug that jsonb array containment works differently from > regular array containment. We understand the source of the bug, ie a > mistaken optimization. I don't see why there's much need for discussion > about anything except whether removing the optimization altogether > (as Peter proposed) is the best fix, or whether we want to retain > some weaker form of it. Right, so I was just saying that after we fix this behavior, the behavior of JSONARRAY @> JSONARRAY should be commented somewhere because that comparison may not work the way users who are not long-time postgres users expect. Heck, I've personally done very little ARRAY @> ARRAY myself in 12 years of using PostgreSQL arrays; I had to test it to verify the current behavior. Not sure exactly where this note should go, mind you. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
В списке pgsql-hackers по дате отправления: