Binary data types
This page documents the preview version (v2.21). Preview includes features under active development and is for development and testing only. For production, use the stable version (v2024.1). To learn more, see Versioning.
Synopsis
Use the BYTEA
data type to represent binary string of bytes (octets). Binary strings allow zeros (0
) and non-printable bytes.
Data type | Description |
---|---|
BYTEA | Variable length binary string |
Description
BYTEA
is used to declare a binary entity.
type_specification ::= BYTEA
- Escaped input can be used for input binary data.
SELECT E'\\001'::bytea