Reference material for OCTET_LENGTH function
Calculates the length of the input string in bytes.
Parameter | Description | Supported input types |
---|---|---|
<expression> | The string or binary data for which to return the length. | TEXT , BYTEA |
INTEGER
Use the OCTET_LENGTH
to find the length of any string in bytes, such as:
Returns: 4
Because the UTF8 encoding of ’🔥’ has the byte sequence 0xF0 0x9F 0x94 0xA5
.
Reference material for OCTET_LENGTH function
Calculates the length of the input string in bytes.
Parameter | Description | Supported input types |
---|---|---|
<expression> | The string or binary data for which to return the length. | TEXT , BYTEA |
INTEGER
Use the OCTET_LENGTH
to find the length of any string in bytes, such as:
Returns: 4
Because the UTF8 encoding of ’🔥’ has the byte sequence 0xF0 0x9F 0x94 0xA5
.