How to use psql with no password prompt?
You have four choices regarding the password prompt:


set the PGPASSWORD environment variable. For details see the manual: http://www.postgresql.org/docs/current/static/libpq-envars.html
use a .pgpass file to store the password. For details see the manual: http://www.postgresql.org/docs/current/static/libpq-pgpass.html
use "trust authentication" for that specific user: http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-TRUST
use a connection URI that contains everything: http://www.postgresql.org/docs/current/static/libpq-connect.html#AEN42532