Skip to main content

Blob Functions

This section describes functions and operators for examining and manipulating blob values.

FunctionDescriptionExampleResult
blob ` *blob`*Blob concatenation
decode(blob)Convert blob to varchar. Fails if blob is not valid utf-8.decode('\xC3\xBC'::BLOB)ü
encode(string)Convert varchar to blob. Converts utf-8 characters into literal encoding.encode('my_string_with_ü')mystring_with\xC3\xBC
octet_length(blob)Number of bytes in bloboctet_length('\xAA\xBB'::BLOB)2