scalar
OCTET_LENGTH
Counts encoded bytes; UTF-8 is assumed here. Example target: PostgreSQL 17. No tables or extensions required.
Formal Syntax & Structure
sql syntaxsql
OCTET_LENGTH(text)Working Example
Example Snippetsql
SELECT octet_length('سلام');