Created
June 22, 2018 19:08
-
-
Save jobliz/439da26f67fe48494ffdffd86b275834 to your computer and use it in GitHub Desktop.
Revisions
-
jobliz created this gist
Jun 22, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ PostgreSQL database configuration with ltree extension ------------------------------------------------------ 1. Install PostgreSQL database (`apt install postgresql postgresql-contrib` under Ubuntu) 2. Log in to the postgres account: `sudo --login --user postgres` 3. Start the PostgreSQL interactive terminal: `psql` 4. Create the database: `postgres=# CREATE DATABASE my_database;` 5. Create a user: `postgres=# CREATE USER my_user WITH PASSWORD 'my_password';` 6. Grant the user access to the database. `postgres=# GRANT ALL PRIVILEGES ON DATABASE my_database to my_user;` 7. Switch to the database: `\connect my_database;` 8. Enable ltree extension on the database: `create extension ltree;` 9. Exit psql: `\q`