{"Entry":{"collection":"func","key":"array-length","name":"array_length","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"d22fedb7f32bed5664fd6ee84072c0fe3390c03c4b096fd5f028eb05ab6d21af","derived_content_hash":"aeba53ee0897b7cfab4adaf3cb7e8016a93ab72192badb13be0926e7ab50c0dc","first_version":"8.4","group":"array","group_label":"Array Functions And Operators","groups":["array"],"imported_at":"2026-09-27T17:57:28.876134+08:00","last_version":"20","name":"array_length","name_key":"array_length","position":19004,"present_in":["8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"7a4e6a20f5324e4b7de19e7fe91193b7368b92c8515cc318504aa658f9168a36","repair":"wiki-repair-20261023"},"signature":"array_length ( anyarray, integer ) → integer","signature_count":1,"slug":"array-length","source_rev":"wiki-repair-20261023:4b3046c7ac82d50dd70dbebb75bd75ec4cce615f700f86246278c87d82af7761","summary":"Returns the length of the requested array dimension.","summary_zh":""}},"Definition":{"Collection":"func","Key":"array-length","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"array-length","SourceRevision":"wiki-repair-20261023:4b3046c7ac82d50dd70dbebb75bd75ec4cce615f700f86246278c87d82af7761","Facts":{"description":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_html":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_zh":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","description_zh_html":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","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":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_html":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_zh":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","description_zh_html":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","examples":[{"expr":"array_length(array[1,2,3], 1)","result":"3"},{"expr":"array_length(array[]::int[], 1)","result":"NULL"},{"expr":"array_length(array['text'], 2)","result":"NULL"}],"html":"\u003ccode class=\"function\"\u003earray_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"array_length ( anyarray, integer ) → integer","zh_from":"same-version-pgdoc"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-array.html","sha256":"a25a0710e8f84e027ef945e85452074399887341e22d79542584f9c646b8f076"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"ARRAY-FUNCTIONS-TABLE","file":"functions-array.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"array-length","SourceDatabase":"center","Version":"18","Locale":"en","Title":"array_length","Summary":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","BodyHTML":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","SourceRevision":"wiki-repair-20261023:4b3046c7ac82d50dd70dbebb75bd75ec4cce615f700f86246278c87d82af7761","ContentHash":"2b864be8e4abde14798f0bceea0896319c1477f9e3c503c588f082b50965e058","Payload":{"description":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_html":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","signatures":[{"description":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_html":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_zh":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","description_zh_html":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","examples":[{"expr":"array_length(array[1,2,3], 1)","result":"3"},{"expr":"array_length(array[]::int[], 1)","result":"NULL"},{"expr":"array_length(array['text'], 2)","result":"NULL"}],"html":"\u003ccode class=\"function\"\u003earray_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"array_length ( anyarray, integer ) → integer","zh_from":"same-version-pgdoc"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"3a178fa38366a452ef4d1352f8634ea41272eea10cf048aafc4f7a683df061a2","Text":"array_length ( anyarray, integer ) → integer","Returns":"integer","Payload":{"description":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_html":"Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)","description_zh":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","description_zh_html":"返回请求的数组维度的长度。（对于空或缺失的数组维度，返回 NULL 而不是 0。）","examples":[{"expr":"array_length(array[1,2,3], 1)","result":"3"},{"expr":"array_length(array[]::int[], 1)","result":"NULL"},{"expr":"array_length(array['text'], 2)","result":"NULL"}],"html":"\u003ccode class=\"function\"\u003earray_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e, \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"array_length ( anyarray, integer ) → integer","zh_from":"same-version-pgdoc"}}],"Spellings":null,"SQLState":null,"Evidence":null}
