{"Entry":{"collection":"func","key":"cardinality","name":"cardinality","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"f80fbb93925b3fc2ac16c4e0392f305407a14ccc4dcdbb9dc248042ce809f405","first_version":"9.4","group":"array","group_label":"Array Functions And Operators","groups":["array"],"imported_at":"2026-09-14T21:49:48.838151+08:00","last_version":"20","name":"cardinality","name_key":"cardinality","position":19018,"present_in":["9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"cardinality ( anyarray ) → integer","signature_count":1,"slug":"cardinality","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"Returns the total number of elements in the array, or 0 if the array is empty.","summary_zh":""}},"Definition":{"Collection":"func","Key":"cardinality","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"cardinality","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"Returns the total number of elements in the array, or 0 if the array is empty.","description_html":"Returns the total number of elements in the array, or 0 if the array is empty.","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":"Returns the total number of elements in the array, or 0 if the array is empty.","description_html":"Returns the total number of elements in the array, or 0 if the array is empty.","description_zh":"","description_zh_html":"","examples":[{"expr":"cardinality(ARRAY[[1,2],[3,4]])","result":"4"}],"html":"\u003ccode class=\"function\"\u003ecardinality\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"cardinality ( anyarray ) → integer","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"ARRAY-FUNCTIONS-TABLE","file":"functions-array.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"cardinality","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"cardinality","Summary":"返回数组中元素的总数，如果数组为空则返回0。","BodyHTML":"返回数组中元素的总数，如果数组为空则返回0。\u003cpre\u003ecardinality ( anyarray ) → integer\u003c/pre\u003e返回数组中元素的总数，如果数组为空则返回0。","SourceRevision":"ca936764","ContentHash":"ea6b924b7ad2f38417f92a59c934b669fae0cd74750a34b389b427f113550486","Payload":{"description_zh":"返回数组中元素的总数，如果数组为空则返回0。","description_zh_html":"返回数组中元素的总数，如果数组为空则返回0。","signatures":[{"description_zh":"返回数组中元素的总数，如果数组为空则返回0。","description_zh_html":"返回数组中元素的总数，如果数组为空则返回0。","returns":"integer","text":"cardinality ( anyarray ) → integer","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"a145f430a07157d93006d0711342fc21fb675727dd2f572058ac6de5f505861d","Text":"cardinality ( anyarray ) → integer","Returns":"integer","Payload":{"description":"Returns the total number of elements in the array, or 0 if the array is empty.","description_html":"Returns the total number of elements in the array, or 0 if the array is empty.","description_zh":"","description_zh_html":"","examples":[{"expr":"cardinality(ARRAY[[1,2],[3,4]])","result":"4"}],"html":"\u003ccode class=\"function\"\u003ecardinality\u003c/code\u003e ( \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"cardinality ( anyarray ) → integer","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
