Commands.app

createdb

Database Management

Create a new PostgreSQL database

Options & Flags
Available options for this command
-O

Specify the owner of the new database

-T

Specify template database to copy

-E

Specify character encoding

Examples
Common usage examples

Create database named myapp

createdb myapp

Create database with specific owner

createdb -O myuser myapp

Create database with UTF-8 encoding

createdb -E UTF8 myapp
Notes
  • Requires appropriate PostgreSQL privileges
Related Commands
You might also find these useful