Updated on 2025-10-23 GMT+08:00

character_sets

The character_sets view provides information about available character sets. For details, see Table 1. This view is read-only. All users have the read permission on this view.

Table 1 information_schema.character_sets columns

Name

Type

Description

CHARACTER_SET_NAME

varchar(32)

Name of a character set.

DEFAULT_COLLATE_NAME

varchar(32)

Default collation for the character set.

DESCRIPTION

varchar(60)

Description of the default collation used by the character set.

MAXLEN

bigint

Maximum number of bytes required to store a character.

The control behavior of the GUC parameter m_format_dev_version is forward compatible.

If m_format_dev_version is set to s1, you can view the information about the character sets of the current database in the view.

m_db=# SET m_format_dev_version=s1;
SET
m_db=# SELECT * FROM information_schema.character_sets;
 CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME |         DESCRIPTION          | MAXLEN
--------------------+----------------------+------------------------------+--------
 UTF8               | utf8mb4_general_ci   | utf8mb4_general_ci collation |      4
(1 row)