Skip to content

Postgres create user and database

I am still getting my head around Postgres, and one thing I find I forget often is the create user and database command.

Create user

CREATE ROLE <username> LOGIN PASSWORD '<password>';

Create Database

CREATE DATABASE <database> OWNER <username>;