Is there a way of enabling a user to logon without being prompted for password? I know there is the .pgpass file, but this file requires the port# and my server has several postgres clusters with different port#. So, am not sure if I can use the .pgpass file.
You can enter a '*' in any field in .pgpass. So,
hostname:port:database:username:password
127.0.0.1:*:*:postgres:abc
Would authenticate the postgres user with pass: abc to any database on any port on 127.0.0.1