pgsql: Fix JSON_OBJECTAGG uniquefying bug

Started by Andrew Dunstanabout 4 years ago1 messagescomitters
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

Fix JSON_OBJECTAGG uniquefying bug

Commit f4fb45d15c contained a bug in removing items with null values when
unique keys are required, where the leading items that are sorted
contained such values. Fix that and add a test for it.

Discussion: /messages/by-id/CAJA4AWQ_XbSmsNbW226UqNyRLJ+wb=iQkQMj77cQyoNkqtf=2Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9c3d25e17894f35045a2d57dfb834e25c9dc4c21

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 14 ++++++++++++--
src/test/regress/expected/sqljson.out | 7 +++++++
src/test/regress/sql/sqljson.sql | 3 +++
3 files changed, 22 insertions(+), 2 deletions(-)