Cloud

pg_encoding_to_char

The pg_encoding_to_char() is a system catalog information function that converts an encoding internal identifier to a human-readable name.

Syntax

pg_encoding_to_char(number)

Parameters

  • number: Specifies the integer value representing the encoding identifier.

Examples

SELECT pg_encoding_to_char(1);

 pg_encoding_to_char
---------------------
 EUC_JP
(1 row)
SELECT pg_encoding_to_char(0);

 pg_encoding_to_char
---------------------
 SQL_ASCII
(1 row)
SELECT pg_encoding_to_char(-1);

 pg_encoding_to_char
---------------------

(1 row)