Re: psql and passwords - Mailing list pgsql-general

From Nigel J. Andrews
Subject Re: psql and passwords
Date
Msg-id Pine.LNX.4.21.0204152007430.20382-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Re: psql and passwords  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, 15 Apr 2002, Tom Lane wrote:

> 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).
>

I don't know when the change was made but it never worked for me, and I'm sure
that included 7.0.2 if not 6.5.1

Anyway, the solution is to set PGPASSWORD in the evironment. Once I remembered
about that it all became so much easier.


--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants


pgsql-general by date:

Previous
From: Timothy Wood
Date:
Subject: using CAST and LIKE
Next
From: Moritz Sinn
Date:
Subject: string encryption