Skip to content

Commit 7220efe

Browse files
committed
Revert "docs: update README with PostgreSQL 18 and role management features"
This reverts commit a6c8221.
1 parent a6c8221 commit 7220efe

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

README.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Questions? Ideas? Contact me: [email protected], Nikolay Samokhvalov.
2222
## Requirements
2323

2424
**You need to have psql version 10 or newer**, but the Postgres server itself can be older – most tools work with it.
25-
You can install the latest postgresql-client library on your machine and use it to work with older Postgres servers – in this case postgres_dba will work. It's recommended to use psql from PostgreSQL 18 (the latest release) for the best compatibility.
25+
You can install postgresql-client library version, say, 12 on your machine and use it to work with Postgres server version 9.6 and older – in this case postgres_dba will work. But you do need to have psql from the latest (version 12) Postgres release.
2626

2727
On clean Ubuntu, this is how you can get postgresql-client and have the most recent psql:
2828
```
2929
sudo sh -c "echo \"deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main\" >> /etc/apt/sources.list.d/pgdg.list"
3030
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
3131
sudo apt-get update
32-
sudo apt-get install -y postgresql-client-18
32+
sudo apt-get install -y postgresql-client-12
3333
```
3434

3535
Using alternative psql pager called "pspg" is highly recommended (but not required): https://github.com/okbob/pspg.
@@ -95,36 +95,6 @@ And then:
9595
:dba
9696
```
9797

98-
## Key Features
99-
100-
### Secure Role Management
101-
102-
**postgres_dba** includes interactive tools for secure role (user) management:
103-
104-
- **r1** – Create user with random password (interactive)
105-
- **r2** – Alter user with random password (interactive)
106-
107-
These tools help prevent password exposure in psql history, logs, and command-line process lists by:
108-
- Generating secure random 16-character passwords
109-
- Using interactive prompts instead of command-line arguments
110-
- Only displaying the password once at creation/alteration time
111-
112-
**Usage example:**
113-
```sql
114-
-- In psql, after launching :dba
115-
-- Select option r1 to create a new user
116-
-- The script will prompt you for:
117-
-- - Username
118-
-- - Superuser privilege (yes/no)
119-
-- - Login privilege (yes/no)
120-
-- The generated password will be displayed once in the output
121-
122-
-- To see the password, set client_min_messages to DEBUG first:
123-
set client_min_messages to DEBUG;
124-
```
125-
126-
**Security note:** These are DBA tools designed for trusted environments where the user already has superuser privileges. The password is shown in the psql output, so ensure you're working in a secure session.
127-
12898
## How to Extend (Add More Queries)
12999
You can add your own useful SQL queries and use them from the main menu. Just add your SQL code to `./sql` directory. The filename should start with some 1 or 2-letter code, followed by underscore and some additional arbitrary words. Extension should be `.sql`. Example:
130100
```

0 commit comments

Comments
 (0)