Updated on 2024-09-06 GMT+08:00

What Are the Constraints on Character Sets?

When creating a database, you can specify a character set using WITH ENCODING. For details about the supported character sets, see the official documentation.

Constraints

When template1 is used to create a database, the character set defined for this template cannot be changed. Otherwise, an error is reported. For details, see TEMPLATE Option.

Example

CREATE DATABASE my_db WITH ENCODING 'UTF8';