pgsql: Fix NULL handling in datum_to_jsonb().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix NULL handling in datum_to_jsonb().
Дата
Msg-id E1ZmmbZ-0006Ma-9N@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix NULL handling in datum_to_jsonb().

The function failed to adhere to its specification that the "tcategory"
argument should not be examined when the input value is NULL.  This
resulted in a crash in some cases.  Per bug #13680 from Boyko Yordanov.

In passing, re-pgindent some recent changes in jsonb.c, and fix a rather
ungrammatical comment.

Diagnosis and patch by Michael Paquier, cosmetic changes by me

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/utils/adt/jsonb.c       |   27 +++++++++++++++------------
src/test/regress/expected/jsonb.out |    9 +++++++++
src/test/regress/sql/jsonb.sql      |    4 ++++
3 files changed, 28 insertions(+), 12 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix NULL handling in datum_to_jsonb().
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Don't send protocol messages to a shm_mq that no longer exists.