Skip to content

BIT_LENGTH

Return the length in bits of a character string.

BIT_LENGTH(string)

For example, what is the maximum length, in bits, of the values in the nickname column:

premdb=# SELECT MAX(BIT_LENGTH(nickname)) FROM team;
 max 
-----
  80
(1 row)