Contents
reverse()
A function for reversing a string
reverse()
is a system function for reversing the order of the characters in the provided string.
reverse()
was added in PostgreSQL 9.1.
Examples
Basic usage example for reverse()
:
postgres=# SELECT reverse('foobar'); reverse --------- raboof (1 row)
Usage with a non-Latin character set:
postgres=# SELECT reverse('ほげほげ'); reverse ---------- げほげほ (1 row)
References
- PostgreSQL documentation: Other String Functions