Function Reference

CHR

MySQL equivalent:

Returns the character with the given Unicode code point.

PostgreSQL 17.5
CHR(code)

Parameters

codeinteger
Unicode code point of the character, the same as ASCII for Latin letters

Return value

A single-character string (text); CHR(0) causes an error

Examples

Characters by Unicode code points

PostgreSQL 17.5
SELECT CHR(72) AS latin,
	CHR(1093) AS cyrillic,
	CHR(8364) AS euro;
latincyrilliceuro
Hх€

Letter code and the next letter

PostgreSQL 17.5
SELECT ASCII('A') AS code,
	CHR(ASCII('A') + 1) AS next_letter;
codenext_letter
65B

Details

The reverse function is ASCII: it returns the code of the first character of a string. CHR(10) is a line break: you can insert it into text with CONCAT or remove it with REPLACE.

See also