Useful sql commands
Start a new database instance:
pg_ctl init -d TEST
pg_ctl -D TEST -o "-p 5433" start
Connect to the new database instance
psql -p 5433
Check username and current database:
select current_user;
select current_database();
Create and connect to a database:
create database test;
\c test;
Create the …
read more