The best way is propably to use a .pgpass file, please see:
https://wiki.postgresql.org/wiki/Pgpass for details
Marco
Am 02.03.2015 um 10:27 schrieb Technical Doubts:
> Dear Team,
> We are unable to connect to PostgreSQL db using psql by passing
> password parameter. If we don't give password, then on password promt
> it's accepting the password we type. But our scheduler script is
> having the psql line with password parameter. Helps highly
> appreciated. Thanks in advance.
> -
> John