Installing postgresql

---

My setup (recommended)

I work in the terminal on the command line

with postgresql installed and running in the background

and use psql and related postgresql command pgdump pg_restore createdb, ...

Alternative

Use a UI interface pgAdmin.


Prerequisites


all you need to know

https://www.postgresql.org/download/

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads


Windows

I wrote a detailled step by step guide for windows users here:

dbsql/installing_on_windows/

PgAdmin

for mac: https://www.postgresql.org/download/macosx/

or https://postgresapp.com/

Postico

for mac: https://eggerapps.at/postico/


Goal

make sure you know how to


Meta commands

\

---

list databases, tables, users etc

Postgresql has a specific syntax to list databases, tables, users etc, all start with \

\l # list databases
\c <database_name># connect to a database
\du # list users

and

\d # list all tables, views, sequences
\dt # list tables
\d <table_name> # shows columns of a specific table
\df # list functions
\dn # list schemas
\dv # list views

and most important (a bit like exiting vim):

\q # quit

https://commandprompt.com/education/postgresql-basic-psql-commands/


Practice

take a few minutes to go through this tutorial

https://tomcam.github.io/postgres/


Pgadmin

this seems like a good walkthrough for windows (screenshots are windows)

https://www.tpointtech.com/connect-to-a-postgresql-database-server

and this for both mac and windows

https://neon.com/postgresql/postgresql-getting-started/connect-to-postgresql-database#2-connect-to-postgresql-database-server-using-pgadmin


EOD


Next

Wrapup

1 / 0