In a terminal I do all, with all permissions by this simple command and no extra credentials:
psql postgres://postgres@localhost/myDB # No password!! No other credentials!
That is: host=localhost, user=postgres, database=myDB.
So, how can I keep QGIS simple to connect with my local PostgreSQL instance?
Can I connect to QGIS using only it? Only host/user/database.
NOTES
I suppose that QGIS's community is mature (since 2002), and it needs and pushes for easy to use and simplicity...
I suppose that QGIS was created to be used with PostGIS... So I suppose that what I need is valid for all versions... But, if you need a reference, I am using QGIS v3+ with PostgreSQL v12+,
psql
version 12+ and PostGIS 3+.Please, any simple solution, by terminal or by menu "Add Layer/PostgreSQL", with no password and no extra-credentials. This question/answer use password, so it is not a solution.
postgres
via QGIS. The admin login exists to allow you to create less privileged login roles and group roles for the actual security model that will be used for your project. Passwords are a way to prevent unauthorized access.psql
stores passwords in a dotfile (in clear text!) to permit casual access. This is nearly enough to get PG banished from sites that take security seriously. pgAdmin4 addressed this with encypherment of the connection passwords. It seems this enhancement request is going is the other direction.