-
- Downloads
Fix treatment of nulls in jsonb_agg and jsonb_object_agg
The wrong is_null flag was being passed to datum_to_json. Also, null object key values are not permitted, and this was not being checked for. Add regression tests covering these cases, and also add those tests to the json set, even though it was doing the right thing. Fixes bug #13514, initially diagnosed by Tom Lane.
Showing
- src/backend/utils/adt/jsonb.c 9 additions, 3 deletionssrc/backend/utils/adt/jsonb.c
- src/test/regress/expected/json.out 20 additions, 1 deletionsrc/test/regress/expected/json.out
- src/test/regress/expected/json_1.out 20 additions, 1 deletionsrc/test/regress/expected/json_1.out
- src/test/regress/expected/jsonb.out 18 additions, 1 deletionsrc/test/regress/expected/jsonb.out
- src/test/regress/expected/jsonb_1.out 18 additions, 1 deletionsrc/test/regress/expected/jsonb_1.out
- src/test/regress/sql/json.sql 11 additions, 2 deletionssrc/test/regress/sql/json.sql
- src/test/regress/sql/jsonb.sql 11 additions, 1 deletionsrc/test/regress/sql/jsonb.sql
Loading
Please register or sign in to comment