cardinality ( anyarray ) → integer → integerReturns the total number of elements in the array, or 0 if the array is empty.
cardinality
Returns the total number of elements in the array, or 0 if the array is empty.
English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- group
- array
- group label
- Array Functions And Operators
- lang
- en
- layout
- table-new
- pages
- functions-array.html
- prose only
- false
Definition PG 18
Returns the total number of elements in the array, or 0 if the array is empty.
Signatures and overloads
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:f8b112c12746e0e501fa11a2b61f5a61f7c033566a9dc05111c382a965f87557
Text language: en · wiki-repair-20261023:f8b112c12746e0e501fa11a2b61f5a61f7c033566a9dc05111c382a965f87557