v.24.3Improvement

Function substring gains new alias byteSlice

Function substring now has a new alias byteSlice. #60494 (Robert Schulze).
Function substring now has a new alias byteSlice.

Why it matters

To provide an alternative, more descriptive name for the substring function that emphasizes byte-level slicing, making the function usage clearer and potentially improving code readability.

How to use it

Use the byteSlice function in the same way as substring to extract substrings at the byte level from strings. For example:

SELECT byteSlice('example', 2, 3);

This is functionally equivalent to:

SELECT substring('example', 2, 3);