for a scripting solution if you don't want to use any possibilities mentioned before, you might want to have a look at *expect* then to catch the prompt and send your password.
Alex.
hubert depesz lubaczewski <depesz@depesz.com> schrieb am Mo., 2. März 2015 um 10:44 Uhr:
On Mon, Mar 02, 2015 at 02:57:46PM +0530, Technical Doubts wrote: > 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.
There is no option to provide password in command line.