createdb
Create a PostgreSQL database. More information: https://www.postgresql.org/docs/current/app-createdb.html.
-
Create a database owned by the current user:
createdb {{database_name}}
-
Create a database owned by a specific user with a description:
createdb --owner={{username}} {{database_name}} '{{description}}'
-
Create a database from a template:
createdb --template={{template_name}} {{database_name}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.