mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
22 lines
546 B
Plaintext
22 lines
546 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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 {{[-O|--owner]}} {{username}} {{database_name}} '{{description}}'`
|
|
|
|
- Create a database from a template:
|
|
|
|
`createdb {{[-T|--template]}} {{template_name}} {{database_name}}`
|