{"Entry":{"collection":"func","key":"json-agg","name":"json_agg","aliases":[],"metadata":{"changed_in":["17"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.3"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":false,"doc_overhaul":false,"from":"16","group_changed":null,"signatures":{"added":["json_agg ( anyelement ORDER BY input_sort_columns ) → json"],"removed":["json_agg ( anyelement ) → json"]},"status":"changed","to":"17"}],"content_hash":"88855f8a0e890e5ace54334412ce6c797e544ca1b5f70af98ba63f0885032a6c","first_version":"9.3","group":"aggregate","group_label":"Aggregate Functions","groups":["aggregate"],"imported_at":"2026-09-14T21:49:48.85306+08:00","last_version":"20","name":"json_agg","name_key":"json_agg","position":21016,"present_in":["9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"json_agg ( anyelement ORDER BY input_sort_columns ) → json","signature_count":1,"slug":"json-agg","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"Collects all the input values, including nulls, into a JSON array.","summary_zh":""}},"Definition":{"Collection":"func","Key":"json-agg","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"json-agg","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"Collects all the input values, including nulls, into a JSON array. Values are converted to JSON as per to_json or to_jsonb.","description_html":"Collects all the input values, including nulls, into a JSON array. Values are converted to JSON as per \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e or \u003ccode class=\"function\"\u003eto_jsonb\u003c/code\u003e.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-AGGREGATE-TABLE","file":"functions-aggregate.html","slug":"18"},"group":"aggregate","group_label":"Aggregate Functions","lang":"en","layout":"table-new","pages":["functions-aggregate.html"],"prose_only":false,"signatures":[{"description":"Collects all the input values, including nulls, into a JSON array. Values are converted to JSON as per to_json or to_jsonb.","description_html":"Collects all the input values, including nulls, into a JSON array. Values are converted to JSON as per \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e or \u003ccode class=\"function\"\u003eto_jsonb\u003c/code\u003e.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ejson_agg\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e \u003ccode class=\"literal\"\u003eORDER BY\u003c/code\u003e \u003ccode class=\"literal\"\u003einput_sort_columns\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"json_agg ( anyelement ORDER BY input_sort_columns ) → json","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-AGGREGATE-TABLE","file":"functions-aggregate.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"json-agg","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"json_agg","Summary":"将所有输入值（包括空值）收集到一个JSON数组中。根据to_json或to_jsonb将值转换为JSON。","BodyHTML":"将所有输入值（包括空值）收集到一个JSON数组中。根据\u003ccode\u003eto_json\u003c/code\u003e或\u003ccode\u003eto_jsonb\u003c/code\u003e将值转换为JSON。\u003cpre\u003ejson_agg ( anyelement ORDER BY input_sort_columns ) → json\u003c/pre\u003e将所有输入值（包括空值）收集到一个JSON数组中。根据\u003ccode\u003eto_json\u003c/code\u003e或\u003ccode\u003eto_jsonb\u003c/code\u003e将值转换为JSON。","SourceRevision":"ca936764","ContentHash":"7f0ece082cb689b590b528eaf5c5782247a7db9927abdd099c15c5eae047fa81","Payload":{"description_zh":"将所有输入值（包括空值）收集到一个JSON数组中。根据to_json或to_jsonb将值转换为JSON。","description_zh_html":"将所有输入值（包括空值）收集到一个JSON数组中。根据\u003ccode class=\"function\"\u003eto_json\u003c/code\u003e或\u003ccode class=\"function\"\u003eto_jsonb\u003c/code\u003e将值转换为JSON。","signatures":[{"description_zh":"将所有输入值（包括空值）收集到一个JSON数组中。根据to_json或to_jsonb将值转换为JSON。","description_zh_html":"将所有输入值（包括空值）收集到一个JSON数组中。根据\u003ccode class=\"function\"\u003eto_json\u003c/code\u003e或\u003ccode class=\"function\"\u003eto_jsonb\u003c/code\u003e将值转换为JSON。","returns":"json","text":"json_agg ( anyelement ORDER BY input_sort_columns ) → json","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"e485a508804bba4ed98559541d3acebbd9bcb925910938db7330d771667c261c","Text":"json_agg ( anyelement ORDER BY input_sort_columns ) → json","Returns":"json","Payload":{"description":"Collects all the input values, including nulls, into a JSON array. Values are converted to JSON as per to_json or to_jsonb.","description_html":"Collects all the input values, including nulls, into a JSON array. Values are converted to JSON as per \u003ccode class=\"function\"\u003eto_json\u003c/code\u003e or \u003ccode class=\"function\"\u003eto_jsonb\u003c/code\u003e.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003ejson_agg\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyelement\u003c/code\u003e \u003ccode class=\"literal\"\u003eORDER BY\u003c/code\u003e \u003ccode class=\"literal\"\u003einput_sort_columns\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejson\u003c/code\u003e","returns":"json","text":"json_agg ( anyelement ORDER BY input_sort_columns ) → json","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
