From d3b0c7b38349d0a198d0176cbd34eb99aceffc1d Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Tue, 6 Jun 2023 20:53:58 +0200 Subject: [PATCH] fix: improved readibility and content --- knowledge base/postgresql.md | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/knowledge base/postgresql.md b/knowledge base/postgresql.md index 87f3be5..0cfc042 100644 --- a/knowledge base/postgresql.md +++ b/knowledge base/postgresql.md @@ -1,16 +1,40 @@ # PostgreSQL +## Table of contents + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) +1. [Sources](#sources) + ## TL;DR ```sh -# connect to a server -psql --host "${HOSTNAME}" --port "${PORT:-5432}" "${DATABASENAME:-root}" "${USERNAME:-root}" +# Installation. +brew install 'postgresql@14' +sudo dnf install 'postgresql' 'postgresql-server' +sudo zypper install 'postgresql15' 'postgresql15-server' + +# Connect to servers via CLI client. +psql --host "${HOSTNAME:-localhost}" --port "${PORT:-5432}" \ + "${DATABASENAME:-root}" "${USERNAME:-root}" ``` ## Further readings -- [Connect to a PostgreSQL database]: https://www.postgresqltutorial.com/connect-to-postgresql-database/ -- [Docker image]: https://github.com/docker-library/docs/blob/master/postgres/README.md +- [Docker image] -[connect to a postgresql database]: https://www.postgresqltutorial.com/connect-to-postgresql-database/ +## Sources + +All the references in the [further readings] section, plus the following: + +- [Connect to a PostgreSQL database] + + [docker image]: https://github.com/docker-library/docs/blob/master/postgres/README.md + + +[further readings]: #further-readings + + + +[connect to a postgresql database]: https://www.postgresqltutorial.com/connect-to-postgresql-database/