I run
psql --host=127.0.0.1 --port=5432 --username=postgres
success, but I must pass password (My password is 123456a@) directly to command. (I will run batch command.) How to do this?
I run
psql --host=127.0.0.1 --port=5432 --username=postgres
success, but I must pass password (My password is 123456a@) directly to command. (I will run batch command.) How to do this?
create a .pgpass file in your home directory with this format
hostname:port:database:username:password
you can substitute any of the fields with a wild card for example if you use the same login for everything
*:*:*:username:password