Updated on 2025-11-25 GMT+08:00

Creating a Database

Scenarios

After an RDS instance is created, you can create databases on it.

Constraints

  • Databases cannot be created for DB instances that are being restored.
  • Database names must be unique.
  • After a database is created, its name cannot be changed.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the instance name to go to the Summary page.
  5. In the navigation pane on the left, choose Databases and Accounts.
  6. On the Databases tab page, click Create Database. In the displayed dialog box, enter database information and click OK.

    Figure 1 Creating a database
    Table 1 Parameters

    Parameter

    Description

    Database Name

    Contains 1 to 63 characters, only including letters, digits, and underscores (_). It cannot start with pg or a digit, and must be different from template database names. RDS for PostgreSQL template databases include postgres, template0, and template1.

    Character Set

    The default character set is utf-8. You can change it as required.

    Template

    Template database. You can create a database using this template. Option template1 (default) is adapted to RDS and template0 complies with the PostgreSQL community settings.

    When you choose template1 to create a database, only the default character set can be used. Otherwise, an error will be reported.

    Collation

    String sort order. The default value is en_US.utf8. Different collations may result in varied ordering results. For example, select 'a'>'A'; is false under en_US.UTF-8, but true under 'C', and also, 'C' must be used to obtain the migration results as expected when data is migrated from Oracle to RDS for PostgreSQL. Collations supported by a database can be queried from system catalog pg_collation.

    Ctype

    Character classification to be used in the new database (LC_CTYPE). This parameter determines how characters, such as lowercase letters, uppercase letters, and digits are classified. By default, the character classification of the template database is used.

    Remarks

    Contains 0 to 512 characters.

  7. After the database is created, manage it on the Databases page.