Switch to: V9V8V7V6V5

Binary Functions

Binary_Length( data )

Returns the binary length of the data.

SELECT Binary_Length(10);
=> 8
 
SELECT Binary_Length('abc');
=> 6
 
 
SELECT Binary_Length(x'03030303');
=> 4

Binary_Left( data, len )

Returns the leftmost len bytes from the data as a HEX string.

SELECT Binary_Left(10, 2);
=> '0A00';
 
SELECT Binary_Left('abc', 2);
=> '6100'
 
SELECT Binary_Left(ARRAY['a','b','c'], 2);
=> '2600'
 
SELECT Binary_Left(x'01020304', 2);
=> '0102'