pgsql: Fix the fastpath rule for jsonb_concat with an empty operand.

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема pgsql: Fix the fastpath rule for jsonb_concat with an empty operand.
Дата
Msg-id E1ZbEcN-0002fL-AV@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix the fastpath rule for jsonb_concat with an empty operand.

To prevent perverse results, we now only return the other operand if
it's not scalar, and if both operands are of the same kind (array or
object).

Original bug complaint and patch from Oskari Saarenmaa, extended by me
to cover the cases of different kinds of jsonb.

Backpatch to 9.5 where jsonb_concat was introduced.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f243072a9ca3d135745441ab016996a00d183bd2

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c     |   16 ++++++++++-----
src/test/regress/expected/jsonb.out   |   36 +++++++++++++++++++++++++++++++++
src/test/regress/expected/jsonb_1.out |   36 +++++++++++++++++++++++++++++++++
src/test/regress/sql/jsonb.sql        |    7 +++++++
4 files changed, 90 insertions(+), 5 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: doc: Remove dead links
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Fix the fastpath rule for jsonb_concat with an empty operand.