Skip to main content

bit_length

Returns number of bits in the binary string, which is 8 times the octet_length.

md5

Returns the MD5 hash of the binary string as a hexadecimal.

octet_length, length

Returns number of bytes in the binary string.

overlay

Added in v2.5.0.
Replaces a substring from a binary string with another bytea value starting at position start_int (>0) for count_int bytes.
Example A
Example B
Example C
Example D

position

Added in v2.5.0.
Returns the index of the first occurrence of a bytea substring, or zero if not found.

sha1

Returns the SHA-1 hash of the binary string.

sha224

Returns the SHA-224 hash of the binary string.

sha256

Returns the SHA-256 hash of the binary string.

sha384

Returns the SHA-384 hash of the binary string.

sha512

Returns the SHA-512 hash of the binary string.

substr

Extracts a substring from a binary string (bytea) starting at position start_int for count_int bytes. If count_int is omitted, the substring extends to the end of the bytea value.

||

Added in v2.5.0.
Concatenates two binary strings.