This topic describes how to create and delete PolarDB for PostgreSQL database.

Create a database

  1. Log on to the Apsara PolarDB console.
  2. In the upper-left corner of the console, select the region where the target cluster resides.
  3. Find the target cluster and click its ID.
  4. In the left-side navigation pane, choose Settings and Management > Databases.
  5. Click Create Database.Create a database in PostgreSQL
  6. Set the following parameters on the buy page.
    Parameter Description
    Database Name
    • The name of the database must start with a letter and end with a letter or digit.
    • The name of the database can contain lowercase letters, digits, underscores (_), and hyphens (-).
    • The database name must be 2 to 64 characters in length.
    • Each database name in an instance must be unique.
    Database owner The database owner, who has all permissions on the database.
    Supported Character Set The character set supported by the database. Default value: UTF8. If you want to use a different character set, select the required character set from the drop-down list.
    Collate The sorting rules of strings.
    Ctype The type of characters.
    Description Enter the remarks of the database to facilitate subsequent database management. The password must meet the following requirements:
    • It cannot start with http:// or https://.
    • The description must start with an uppercase or lowercase letter.
    • The description can contain uppercase or lowercase letters, digits, underscores (_), and hyphens (-).
    • It must be 2 to 256 characters in length.
  7. Click OK.

Delete a database

  1. Log on to the Apsara PolarDB console.
  2. In the upper-left corner of the console, select the region where the target cluster resides.
  3. Find the target cluster and click its ID.
  4. In the left-side navigation pane, choose Settings and Management > Databases.
  5. Find the target database. Click delete.
  6. In the message that appears, click OK.

Related operations

Operation Description
CreateDatabase Create a database
DescribeDatabases Views the database list.
ModifyDBDescription Modifies the description of a database.
DeleteDatabase Delete a database