Sunday Ezeilo
Sunday Ezeilo

Reputation: 311

CREATE DATABASE in PostgreSQL

Why does the Owner show "postgres" after creating a new PostgreSQL database? How can I create a new database with my DB user as the owner? My DB user has the privilege to create a database.

Upvotes: 0

Views: 371

Answers (1)

user330315
user330315

Reputation:

As documented in the manual you can specify the owner when creating the database

create database my_new_dabase
    OWNER = sunday_ezeilo;

This assumes that you already have a role/user named sunday_ezeilo

Upvotes: 2

Related Questions