Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id EA2D064FE53 for ; Mon, 3 Nov 2008 17:36:33 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 22968-02 for ; Mon, 3 Nov 2008 17:36:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from nrccenexf2.nrc.ca (nrccenexf2.nrc.ca [132.246.15.83]) by mail.postgresql.org (Postfix) with ESMTP id 50FE764FDEF for ; Mon, 3 Nov 2008 17:36:33 -0400 (AST) Received: from nrccenexf1.nrc.ca ([132.246.15.80]) by nrccenexf2.nrc.ca with Microsoft SMTPSVC(6.0.3790.3959); Mon, 3 Nov 2008 16:36:31 -0500 Received: from [192.168.11.203] ([132.246.15.66]) by nrccenexf1.nrc.ca over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 3 Nov 2008 16:36:30 -0500 Message-ID: <490F6EDE.70502@nrc-cnrc.gc.ca> Date: Mon, 03 Nov 2008 13:36:30 -0800 From: Isabella Ghiurea Reply-To: isabella.ghiurea@nrc-cnrc.gc.ca Organization: CADC -NRC User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: connect to psql without passwd Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Nov 2008 21:36:30.0996 (UTC) FILETIME=[3C53FD40:01C93DFC] X-Archive-Number: 200811/14 X-Sequence-Number: 30668 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