Bytes Type

type bytes

A sequence of bytes.

Bytes cannot be cast into any other type. They represent raw data.

There’s a special byte literal:

db> 
SELECT b'Hello, world';
{b'Hello, world'}
db> 
SELECT b'Hello,\x20world\x01';
{b'Hello, world\x01'}

There are also some generic functions that can operate on bytes:

db> 
SELECT contains(b'qwerty', b'42');
{false}