Re: psql and passwords - Mailing list pgsql-general

From Tom Lane
Subject Re: psql and passwords
Date
Msg-id 25452.1018896745@sss.pgh.pa.us
Whole thread Raw
In response to psql and passwords  (Michael Devogelaere <michael@mind.be>)
Responses Re: psql and passwords
List pgsql-general
Michael Devogelaere <michael@mind.be> writes:
> With the previous version, i passed the password with
>  'echo pass | psql -d db -U user -h server -c "..."'
> but that doesn't seem to work anymore (because it reads the password now
> from /dev/tty instead of stdin i guess).

This was a deliberate change (some of us had misgivings about it but
were voted down).

I'd suggest seeing if you can't avoid needing passwords anymore,
instead.  "ident" auth works over local connections now (at least
on some platforms, including recent Linuxen).

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: function for creating random id
Next
From: Gunther Schadow
Date:
Subject: Re: User-Defined Datatypes