Create a database

更新时间:
复制 MD 格式

Creates a new database.

Syntax

CREATE DATABASE name

Parameters

ParameterDescription
nameThe name of the new database.

Description

The CREATE DATABASE command creates a new database.

Note
  • Only superusers or users with the polar_superuser or createdb permission can create databases.
  • Non-superusers with the createdb permission can only create databases that they own.
  • The CREATE DATABASE command cannot be executed inside a transaction block.
  • Sufficient disk space is required to create a new database.

Example

CREATE DATABASE testdb;