Create a database with explicit owner and template.
Section: Database and Role Lifecycle
Create database with owner
sql
sql
CREATE DATABASE appdb OWNER appuser TEMPLATE template0 ENCODING 'UTF8';Explanation
See summary for usage details.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Database and Role Lifecycle