↑↓ select ↵ open ⌫ change scope Open full search

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

Functions / String Functions And Operators

Returns the character with the given code.

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

Signatures & examples

chr ( integer ) → text
Returns the character with the given code. In UTF8 encoding the argument is treated as a Unicode code point. In other multibyte encodings the argument must designate an ASCII character. chr(0) is disallowed because text data types cannot store that character.
chr(65) → A
Version history 5
  1. 12 → 13 changed
  2. 8.3 → 8.4 changed
  3. 8.2 → 8.3 changed
  4. 8.0 → 8.1 changed
  5. 7.2 → 7.3 changed

Definition snapshot: b7bd9cda · English manual source