Bug in comparison of empty jsonb arrays to scalars

Поиск
Список
Период
Сортировка
От Nikita Glukhov
Тема Bug in comparison of empty jsonb arrays to scalars
Дата
Msg-id 6ca2551e-95af-928a-a3d9-33f6e06d6b6f@postgrespro.ru
обсуждение исходный текст
Ответы Re: Bug in comparison of empty jsonb arrays to scalars
Список pgsql-hackers
Hi hackers.

While working on jsonbstatistics, I found the following bug:
an empty jsonb array is considered to be lesser than any scalar,
but it is expected that objects > arrays > scalars.

# select '[]'::jsonb < 'null'::jsonb;
  ?column?
----------
  t
(1 row)

Attached patch contains:
  1. bug fix (added the missing "else" in compareJsonbContainers())
  2. regression test
  3. pg_upgrade: invalidation of btree indexes on jsonb columns and
REINDEX-script generation

--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: commitfest 2016-11 status summary
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: commitfest 2016-11 status summary