{"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","derived_content_hash":"0dabcc038f54c17e631d988bfb7b1b8704e281ede1e0553bd4ac132f7f10b32a","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"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"8192644f2c4313f8515bce7f048d407088621f393ba3316fd3f1924c179ef1f2","repair":"wiki-repair-20261023"},"signature":"cardinality ( anyarray ) → integer","signature_count":1,"slug":"cardinality","source_rev":"wiki-repair-20261023:f8b112c12746e0e501fa11a2b61f5a61f7c033566a9dc05111c382a965f87557","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":"wiki-repair-20261023:f8b112c12746e0e501fa11a2b61f5a61f7c033566a9dc05111c382a965f87557","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":"返回数组中元素的总数，如果数组为空则返回 0。","description_zh_html":"返回数组中元素的总数，如果数组为空则返回 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 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":"返回数组中元素的总数，如果数组为空则返回 0。","description_zh_html":"返回数组中元素的总数，如果数组为空则返回 0。","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":"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":"cardinality","SourceDatabase":"center","Version":"18","Locale":"en","Title":"cardinality","Summary":"Returns the total number of elements in the array, or 0 if the array is empty.","BodyHTML":"Returns the total number of elements in the array, or 0 if the array is empty.","SourceRevision":"wiki-repair-20261023:f8b112c12746e0e501fa11a2b61f5a61f7c033566a9dc05111c382a965f87557","ContentHash":"42570feaff9033831526e075c447e3fb415c673d944be4cd118ad70ae76f6e79","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.","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":"返回数组中元素的总数，如果数组为空则返回 0。","description_zh_html":"返回数组中元素的总数，如果数组为空则返回 0。","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":"same-version-pgdoc"}]}},"RequestedLocale":"en","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":"返回数组中元素的总数，如果数组为空则返回 0。","description_zh_html":"返回数组中元素的总数，如果数组为空则返回 0。","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":"same-version-pgdoc"}}],"Spellings":null,"SQLState":null,"Evidence":null}
