Re: Need help with bash script and postgresql - Mailing list pgsql-general

From shakahshakah@gmail.com
Subject Re: Need help with bash script and postgresql
Date
Msg-id 1185192561.860755.172380@k79g2000hse.googlegroups.com
Whole thread Raw
In response to Re: Need help with bash script and postgresql  (Raymond O'Donnell <rod@iol.ie>)
List pgsql-general
On Jul 23, 6:11 am, r...@iol.ie ("Raymond O'Donnell") wrote:
> On 23/07/2007 11:04, Andy Dale wrote:
>
> > The posgres command in the loop should look like so (not sure about the
> > password):
>
> As I understand it, you supply the password via a pgpass file - you
> can't include it on the command line.
>
> Ray.
>
> ---------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> r...@iol.ie
> ---------------------------------------------------------------

FWIW you can supply the password via a PGPASSWORD environment
variable, e.g.:

prompt$ PGPASSWORD=secret psql -h pghost -U pguser -d thedb -c "SELECT
'x'"


pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: invalid memory alloc request size 2147483648 using toode LIKE 'ä%'
Next
From: Gregory Stark
Date:
Subject: Re: varchar does not work too well with IS NOT NULL partial indexes.