mirror of
https://github.com/postgres/postgres.git
synced 2026-01-27 21:43:08 +03:00
Add reverse(bytea).
This commit introduces a function for reversing the order of the bytes in binary strings. Bumps catversion. Author: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://postgr.es/m/CAJ7c6TMe0QVRuNssUArbMi0bJJK32%2BzNA3at5m3osrBQ25MHuw%40mail.gmail.com
This commit is contained in:
@@ -77,6 +77,10 @@ SELECT E'De\123dBeEf'::bytea;
|
||||
SELECT E'De\\123dBeEf'::bytea;
|
||||
SELECT E'De\\678dBeEf'::bytea;
|
||||
|
||||
SELECT reverse(''::bytea);
|
||||
SELECT reverse('\xaa'::bytea);
|
||||
SELECT reverse('\xabcd'::bytea);
|
||||
|
||||
SET bytea_output TO escape;
|
||||
SELECT E'\\xDeAdBeEf'::bytea;
|
||||
SELECT E'\\x De Ad Be Ef '::bytea;
|
||||
|
||||
Reference in New Issue
Block a user