{"Entry":{"collection":"func","key":"array-sort","name":"array_sort","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"17","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"18"}],"content_hash":"6b1bc41b3547d3e91daf8b35a9dbf6010540630a33fac1709dfff4c2d28ab6d4","first_version":"18","group":"array","group_label":"Array Functions And Operators","groups":["array"],"imported_at":"2026-09-14T21:49:48.836543+08:00","last_version":"20","name":"array_sort","name_key":"array_sort","position":19015,"present_in":["18","19","20"],"signature":"array_sort ( array anyarray [, descending boolean [, nulls_first boolean ]] ) → anyarray","signature_count":1,"slug":"array-sort","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"Sorts the first dimension of the array.","summary_zh":""}},"Definition":{"Collection":"func","Key":"array-sort","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"array-sort","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"Sorts the first dimension of the array. The sort order is determined by the default sort ordering of the array's element type; however, if the element type is collatable, the collation to use can be specified by adding a COLLATE clause to the array argument.","description_html":"Sorts the first dimension of the array. The sort order is determined by the default sort ordering of the array's element type; however, if the element type is collatable, the collation to use can be specified by adding a \u003ccode class=\"literal\"\u003eCOLLATE\u003c/code\u003e clause to the \u003cem class=\"parameter\"\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e argument.","description_zh":"","description_zh_html":"","doc":{"anchor":"ARRAY-FUNCTIONS-TABLE","file":"functions-array.html","slug":"18"},"group":"array","group_label":"Array Functions And Operators","lang":"en","layout":"table-new","pages":["functions-array.html"],"prose_only":false,"signatures":[{"description":"Sorts the first dimension of the array. The sort order is determined by the default sort ordering of the array's element type; however, if the element type is collatable, the collation to use can be specified by adding a COLLATE clause to the array argument.","description_html":"Sorts the first dimension of the array. The sort order is determined by the default sort ordering of the array's element type; however, if the element type is collatable, the collation to use can be specified by adding a \u003ccode class=\"literal\"\u003eCOLLATE\u003c/code\u003e clause to the \u003cem class=\"parameter\"\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e argument.","description_zh":"","description_zh_html":"","examples":[{"expr":"array_sort(ARRAY[[2,4],[2,1],[6,5]])","result":"{{2,1},{2,4},{6,5}}"}],"html":"\u003ccode class=\"function\"\u003earray_sort\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edescending\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enulls_first\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ]\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003eanyarray\u003c/code\u003e","returns":"anyarray","text":"array_sort ( array anyarray [, descending boolean [, nulls_first boolean ]] ) → anyarray","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"ARRAY-FUNCTIONS-TABLE","file":"functions-array.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"array-sort","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"array_sort","Summary":"对数组的第一维进行排序。排序顺序由数组元素类型的默认排序顺序决定；不过，如果元素类型支持排序规则，也可以通过给array参数添加COLLATE子句来指定要使用的排序规则。","BodyHTML":"对数组的第一维进行排序。排序顺序由数组元素类型的默认排序顺序决定；不过，如果元素类型支持排序规则，也可以通过给\u003cem\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e参数添加\u003ccode\u003eCOLLATE\u003c/code\u003e子句来指定要使用的排序规则。\u003cpre\u003earray_sort ( array anyarray [, descending boolean [, nulls_first boolean ]] ) → anyarray\u003c/pre\u003e对数组的第一维进行排序。排序顺序由数组元素类型的默认排序顺序决定；不过，如果元素类型支持排序规则，也可以通过给\u003cem\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e参数添加\u003ccode\u003eCOLLATE\u003c/code\u003e子句来指定要使用的排序规则。","SourceRevision":"1b5ca64c","ContentHash":"44d43e46c0e830bf9cf5145f1198b156b15719ebf76c7b8fd0a69a5dfbe58a8f","Payload":{"description_zh":"对数组的第一维进行排序。排序顺序由数组元素类型的默认排序顺序决定；不过，如果元素类型支持排序规则，也可以通过给array参数添加COLLATE子句来指定要使用的排序规则。","description_zh_html":"对数组的第一维进行排序。排序顺序由数组元素类型的默认排序顺序决定；不过，如果元素类型支持排序规则，也可以通过给\u003cem class=\"parameter\"\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e参数添加\u003ccode class=\"literal\"\u003eCOLLATE\u003c/code\u003e子句来指定要使用的排序规则。","signatures":[{"description_zh":"对数组的第一维进行排序。排序顺序由数组元素类型的默认排序顺序决定；不过，如果元素类型支持排序规则，也可以通过给array参数添加COLLATE子句来指定要使用的排序规则。","description_zh_html":"对数组的第一维进行排序。排序顺序由数组元素类型的默认排序顺序决定；不过，如果元素类型支持排序规则，也可以通过给\u003cem class=\"parameter\"\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e参数添加\u003ccode class=\"literal\"\u003eCOLLATE\u003c/code\u003e子句来指定要使用的排序规则。","returns":"anyarray","text":"array_sort ( array anyarray [, descending boolean [, nulls_first boolean ]] ) → anyarray","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"49a20fc4f40ab235f7cd1d41372d27bbbc11d00b47ee67c02cd2cc941c5d3def","Text":"array_sort ( array anyarray [, descending boolean [, nulls_first boolean ]] ) → anyarray","Returns":"anyarray","Payload":{"description":"Sorts the first dimension of the array. The sort order is determined by the default sort ordering of the array's element type; however, if the element type is collatable, the collation to use can be specified by adding a COLLATE clause to the array argument.","description_html":"Sorts the first dimension of the array. The sort order is determined by the default sort ordering of the array's element type; however, if the element type is collatable, the collation to use can be specified by adding a \u003ccode class=\"literal\"\u003eCOLLATE\u003c/code\u003e clause to the \u003cem class=\"parameter\"\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e argument.","description_zh":"","description_zh_html":"","examples":[{"expr":"array_sort(ARRAY[[2,4],[2,1],[6,5]])","result":"{{2,1},{2,4},{6,5}}"}],"html":"\u003ccode class=\"function\"\u003earray_sort\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003earray\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003edescending\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enulls_first\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eboolean\u003c/code\u003e\u003c/span\u003e ]\u003c/span\u003e] ) → \u003ccode class=\"returnvalue\"\u003eanyarray\u003c/code\u003e","returns":"anyarray","text":"array_sort ( array anyarray [, descending boolean [, nulls_first boolean ]] ) → anyarray","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
