aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2025-03-13 11:20:53 -0500
committerNathan Bossart <nathan@postgresql.org>2025-03-13 11:20:53 -0500
commit0697b23906adabccba41fa7bf19909eb98bdf0dd (patch)
tree5e28e71b6fced7c1b4fc6a9fc2cf33b68923f1e9 /doc/src
parentbb25276205b45b60b5a1ddb7db3b66f501a02164 (diff)
downloadpostgresql-0697b23906adabccba41fa7bf19909eb98bdf0dd.tar.gz
postgresql-0697b23906adabccba41fa7bf19909eb98bdf0dd.zip
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 51dd8ad6571..1c3810e1a04 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -4663,6 +4663,23 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
+ <primary>reverse</primary>
+ </indexterm>
+ <function>reverse</function> ( <type>bytea</type> )
+ <returnvalue>bytea</returnvalue>
+ </para>
+ <para>
+ Reverses the order of the bytes in the binary string.
+ </para>
+ <para>
+ <literal>reverse('\xabcd'::bytea)</literal>
+ <returnvalue>\xcdab</returnvalue>
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="func_table_entry"><para role="func_signature">
+ <indexterm>
<primary>set_bit</primary>
</indexterm>
<function>set_bit</function> ( <parameter>bytes</parameter> <type>bytea</type>,