| From: | "shakahshakah(at)gmail(dot)com" <shakahshakah(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Need help with bash script and postgresql |
| Date: | 2007-07-23 12:09:21 |
| Message-ID: | 1185192561.860755.172380@k79g2000hse.googlegroups.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Jul 23, 6:11 am, r(dot)(dot)(dot)(at)iol(dot)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(dot)(dot)(dot)(at)iol(dot)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'"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Perry Smith | 2007-07-23 13:22:51 | Re: Need help with bash script and postgresql |
| Previous Message | Luca Ciciriello | 2007-07-23 10:57:18 | Re: Retrieve the record ID |