Home Data Platform Cloud Reference Redpanda SQL Reference Functions String octet_length Cloud Page options Copy as Markdown Copied! View as plain text Ask AI about this topic Add MCP server to VS Code octet_length The octet_length() function returns the number of bytes in a binary (bytea) value. See also length() to find the number of characters in a text string. Syntax OCTET_LENGTH(data) Arguments data: A bytea value. Return type int Examples Basic usage SELECT OCTET_LENGTH('\xdeadbeef'::bytea); octet_length -------------- 4 (1 row) Empty value SELECT OCTET_LENGTH(''::bytea); octet_length -------------- 0 (1 row) Back to top Was this helpful? thumb_up thumb_down group Ask in the community mail Share your feedback 🎉 Thanks for your feedback! ltrim position