psql should never prompt for a password

No matter if we have been given a password or not, it never makes sense
for psql to interactively prompt for a password. It's better to fail
immediately than to hang because psql is waiting for input that will
never happen.

http://www.postgresql.org/docs/9.2/static/app-psql.html

For documentation on the --no-password option.