select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Unsupported versions: 6.3
Historical version. PostgreSQL 6.3 reached end of support in March 2003. See the current manual for supported releases.
PostgreSQL
Prev Chapter 24. Managing a Database Next

Creating a Database

Let's say you want to create a database named mydb. You can do this with the following command:

% createdb mydb
Postgres allows you to create any number of databases at a given site and you automatically become the database administrator of the database you just created. Database names must have an alphabetic first character and are limited to 16 characters in length. Not every user has authorization to become a database administrator. If Postgres refuses to create databases for you, then the site administrator needs to grant you permission to create databases. Consult your site administrator if this occurs.
Prev Home Next
Managing a Database Up Accessing a Database

Report a documentation issue

Read the upstream documentation. For corrections, first check the current manual.