diff --git a/doc/src/sgml/func/func-aggregate.sgml b/doc/src/sgml/func/func-aggregate.sgml index 8b5eaeb2e94..71747bb3c18 100644 --- a/doc/src/sgml/func/func-aggregate.sgml +++ b/doc/src/sgml/func/func-aggregate.sgml @@ -404,6 +404,9 @@ 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 @@ -432,7 +435,10 @@ are coerced to text; value arguments are converted as per to_json or to_jsonb. The key cannot be null. If the - value is null then the entry is skipped, + 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 @@ -490,8 +496,9 @@ are coerced to text; value arguments are converted as per to_json or to_jsonb. The key cannot be null. If the - value is null then the entry is skipped. - If there is a duplicate key an error is thrown. + value is null then the pair is skipped. + If there is a duplicate key (including pairs with null values) + an error is thrown. No