to_hex()

Converts blob to VARCHAR using hexadecimal encoding.

Alias of hex()

Arguments & returns

7 overloads

to_hex(blob)

Scalar
Overload link blob Returns
#01 BLOB VARCHAR

to_hex(string)

Scalar

Converts the string to hexadecimal representation.

Overload link string Returns
#02 VARCHAR VARCHAR

to_hex(value)

Scalar

Converts the value to hexadecimal representation.

Overload link value Returns
#03 BIGINT VARCHAR
#04 HUGEINT VARCHAR
#05 UBIGINT VARCHAR
#06 UHUGEINT VARCHAR
#07 VARINT VARCHAR

Example

2 more ↓
to_hex example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

More examples

to_hex example 2
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

to_hex example 3
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

Catalog examples

SELECT
  hex('\xAA\xBB'::BLOB);
SELECT
  hex('Hello');
SELECT
  hex(42);