pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Isabella Ghiurea <isabella.ghiurea@nrc-cnrc.gc.ca>
To: pgsql-admin@postgresql.org
Subject: connect to psql without passwd
Date: Mon, 03 Nov 2008 13:36:30 -0800
Message-ID: <490F6EDE.70502@nrc-cnrc.gc.ca> (raw)

I'm writing a shell script to run analyze and other jobs as use 
postgres, having issues passing the passwd  in psql is always asking for 
password, I'm using .pgpass file as argument in psql ( I understood 
PGPASS is depreciated). My .pgpass file contains only the passwd string  
not the full connection string9 hostname, port etc) since this is local 
connection , but is  always asking for passwd, using  :PG ver 8.3, RH 5,
The script contains something like :
Home=
PSQL=
PGDATA=
 export HOME, PSQL, PGDATA etc
(cat $HOME/.pgpass
 cat << EOF
REINDEX database test
;
EOF
) | $PSQL -U postgres -d test  > /var/lib/pgsql//reindex.log

thank you
Isabella





view thread (2+ messages)  latest in thread

Message-ID: <490F6EDE.70502@nrc-cnrc.gc.ca>
Permalink:  ../490F6EDE.70502@nrc-cnrc.gc.ca/
Also on:    postgresql.org/message-id/490F6EDE.70502@nrc-cnrc.gc.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: isabella.ghiurea@nrc-cnrc.gc.ca
  Subject: Re: connect to psql without passwd
  In-Reply-To: <490F6EDE.70502@nrc-cnrc.gc.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox