feat: adjust doc/postgres-connect.md

This commit is contained in:
dancingCycle 2023-11-16 10:37:18 +01:00
parent 36090c4370
commit 3b6b4d64a8
1 changed files with 5 additions and 5 deletions

View File

@ -2,16 +2,16 @@
* OPTION: connect to Postgres as admin user
```
sudo -u postgres psql -U postgres -W
sudo -u postgres psql -U postgres
```
* OPTION: connect to the database <database name> as user <user name>
* OPTION: connect to the database `database name` as user `user name`
```
psql -U <user name> -d <database name> -W
psql -U <user name> -d <database name>
```
* OPTION: connect to the database <database name> as user <user name> to a remote Postgres instance at host <host name> and port <port number> (NOTE: Configure Postgres for remote connections like [this](./postgres.md))
* OPTION: connect to the database `database name` as user `user name` to a remote Postgres instance at host `host name` and port `port number` (NOTE: Configure Postgres for remote connections like [this](./postgres.md))
```
psql -h <host name> -p <port number> -U <user name> -d <database name> -W
psql -h <host name> -p <port number> -U <user name> -d <database name>
```