Skip to content

Instantly share code, notes, and snippets.

@IvanCl4udio
Last active May 19, 2021 10:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IvanCl4udio/68d5fe7510ccc54bfc2d232fccf45565 to your computer and use it in GitHub Desktop.
Save IvanCl4udio/68d5fe7510ccc54bfc2d232fccf45565 to your computer and use it in GitHub Desktop.
How create a new database in PostgreSQL

How create a new database in PostgreSQL

Access the sql console and run the following command:

CREATE DATABASE "example_db"
WITH OWNER "postgres"
ENCODING 'UTF8'
LC_COLLATE = 'en-US'
LC_CTYPE = 'en-US'
TEMPLATE template0;

Thanks Stackoverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment