for installation and creating DB visit https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04
for quick start visit https://github.com/jackc/pgx/wiki/Getting-started-with-pgx
and for more command see cheat sheet !