create postgres database ubuntu code example
Example 1: ubuntu install and configure postgres server
sudo apt update
sudo apt install postgresql postgresql-contrib
Example 2: createdb with postgresql on ubuntu
susudo -u postgres
psqlpostgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;