Skip site navigation (1) Skip section navigation (2)

connect to psql without passwd

From: Isabella Ghiurea <isabella(dot)ghiurea(at)nrc-cnrc(dot)gc(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Subject: connect to psql without passwd
Date: 2008-11-03 21:36:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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 :
 export HOME, PSQL, PGDATA etc
(cat $HOME/.pgpass
 cat << EOF
REINDEX database test
) | $PSQL -U postgres -d test  > /var/lib/pgsql//reindex.log

thank you


pgsql-admin by date

Next:From: Milen A. RadevDate: 2008-11-03 21:47:19
Subject: Re: connect to psql without passwd
Previous:From: Scott MarloweDate: 2008-11-03 16:04:57
Subject: Re: Crash with pg_clog file not found

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group