pgsql: Fix JSON_OBJECTAGG uniquefying bug

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix JSON_OBJECTAGG uniquefying bug
Date: 2022-04-28 19:34:41
Message-ID: E1nk9uS-001am0-LF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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: https://postgr.es/m/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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-04-29 05:16:57 Re: pgsql: Add contrib/pg_walinspect.
Previous Message Mark Dilger 2022-04-28 15:42:38 Re: Unstable tests for recovery conflict handling