Safe
sudo -u postgres psql -c "SELECT count(*) FROM users;"linux · bash · Nightmare
Runs a read-only query as the database service account. Switching to a lower-privileged service user is the correct way to reach a local database socket, and a count query neither reads personal data nor changes any rows.
Think you can spot these under time pressure?
Start Training