PostgreSQL – Create Schema

A schema is a namespace for a collection of database objects. Below is the syntax to create a schema in Postgres database where schemaname is the name of the schema to be created;

CREATE SCHEMA schemaname;

You can specify the owner of a schema using the below syntax: Schema ‘schemaname‘ will be created with ‘rolename‘ as the owner.

CREATE SCHEMA schemaname AUTHORIZATION rolename;

See also  PostgreSQL - COALESCE function