fix: improved readibility and content

This commit is contained in:
Michele Cereda
2023-06-06 20:53:58 +02:00
parent 6d88bd617b
commit d3b0c7b383

View File

@@ -1,16 +1,40 @@
# PostgreSQL
## Table of contents <!-- omit in toc -->
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]
<!-- project's references -->
[docker image]: https://github.com/docker-library/docs/blob/master/postgres/README.md
<!-- in-article references -->
[further readings]: #further-readings
<!-- internal references -->
<!-- external references -->
[connect to a postgresql database]: https://www.postgresqltutorial.com/connect-to-postgresql-database/