diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 68219107512..78d9469bc92 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -21986,6 +21986,9 @@ SELECT NULLIF(value, '(none)') ... are coerced to text; value arguments are converted as per to_json or to_jsonb. Values can be null, but keys cannot. + If a key appears more than once, the json result keeps + every pair, while the jsonb result keeps only the last + value for that key. No @@ -22013,8 +22016,11 @@ SELECT NULLIF(value, '(none)') ... Collects all the key/value pairs into a JSON object. Key arguments are coerced to text; value arguments are converted as per to_json or to_jsonb. - The key can not be null. If the - value is null then the entry is skipped, + The key cannot be null. If the + value is null then the pair is skipped. + Duplicate keys are handled as for json_object_agg + and jsonb_object_agg, after removing any pairs + with null values. No @@ -22071,9 +22077,10 @@ SELECT NULLIF(value, '(none)') ... Collects all the key/value pairs into a JSON object. Key arguments are coerced to text; value arguments are converted as per to_json or to_jsonb. - The key can not be null. If the - value is null then the entry is skipped. - If there is a duplicate key an error is thrown. + The key cannot be null. If the + value is null then the pair is skipped. + If there is a duplicate key (including pairs with null values) + an error is thrown. No