↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / String Functions And Operators

Removes the longest string containing only characters in characters (a space by default) from the end of string.

Reading PG 18current·documented in 27 of 27 versions, 7.1 to 20

Signatures & examples

rtrim ( string text [, characters text ] ) → text
Removes the longest string containing only characters in characters (a space by default) from the end of string.
rtrim('testxxzx', 'xyz') → test
rtrim ( bytes bytea, bytesremoved bytea ) → bytea
Removes the longest string containing only bytes appearing in bytesremoved from the end of bytes.
rtrim('\x1234567890'::bytea, '\x9012'::bytea) → \x12345678
Version history 5
  1. 13 → 14 changed
  2. 12 → 13 changed
  3. 7.4 → 8.0 changed
  4. 7.3 → 7.4 changed
  5. 7.2 → 7.3 changed

Definition snapshot: b7bd9cda · English manual source