An open-source relational SQL database
Postgres Setup Linux
sudo pacman -S postgresql
sudo -u postgres -i
initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'
exit
sudo systemctl enable postgresql.service
sudo systemctl start postgresql.service
sudo -u postgres -i
Creating Database
createdb <economy>
psql <databasename>
create role <user> with superuser login createdb;
\password <user>
set role <user>;
select current_user;
. you should be the <user> now.
CREATE TABLE profiles (
username VARCHAR(60) NOT NULL,
password VARCHAR(60) NOT NULL,
family_members INTEGER);
INSERT INTO profiles values('david', '$2a$12$N88TysI0Kyz.l5TJlaHdbuuxPRt/5LoSJLqFqhYh2y2ksIAd2YtBe', 3);
Postgres Setup Windows
- Install postgresql https://www.postgresql.org/download/
- Add postgresql bin directory to PATH environment variable