PostgreSQL 🍰

cozyhosting

PostgreSQL is an open-source relational database management system. It uses and extends the SQL language combined with many features that safely store and scale complex data workloads.

Port(s) 🐊: 5432 (TCP)

$ psql -h SOME_IP -U root
$ psql -h SOME_IP -U root -d database

⚠️ Don't forget -h or it doesn't seem to work.

Some commands

SELECT datname FROM pg_database; -- list databases
\c db_name                       -- select one
\dt                              -- list tables
\d table_name                    -- describe table
SELECT tablename FROM pg_tables WHERE schemaname = 'public'; -- list tables
SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = 'public' AND table_name = 'table_name'; -- describe table

πŸ‘» To-do πŸ‘»

Stuff that I found, but never read/used yet.

  • service postgresql status