X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2FC19D7024 for ; Mon, 22 Aug 2005 14:47:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98274-08 for ; Mon, 22 Aug 2005 17:47:44 +0000 (GMT) Received: from mail.travelamericas.com (unknown [206.130.134.147]) by svr1.postgresql.org (Postfix) with SMTP id B2DBBD7021 for ; Mon, 22 Aug 2005 14:47:40 -0300 (ADT) Received: (qmail 31921 invoked from network); 22 Aug 2005 17:47:39 -0000 Received: from unknown (HELO ?10.0.0.253?) (10.0.0.253) by verkiel.travelamericas.com with SMTP; 22 Aug 2005 17:47:39 -0000 Message-ID: <430A0FBA.80507@metatrontech.com> Date: Mon, 22 Aug 2005 10:47:38 -0700 From: Chris Travers User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hemapriya , pgsql-admin@postgresql.org Subject: Re: connect to postgres from shell scripts References: <20050822154246.28488.qmail@web34210.mail.mud.yahoo.com> In-Reply-To: <20050822154246.28488.qmail@web34210.mail.mud.yahoo.com> Content-Type: multipart/mixed; boundary="------------040905010600050605080509" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.051 required=5 tests=[AWL=0.001, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/342 X-Sequence-Number: 18661 This is a multi-part message in MIME format. --------------040905010600050605080509 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hemapriya wrote: >Hi, > >I would like to know how to connect to postgres from >shell scripts using a password protected user. > > psql is the simple way. >Is there a way to embed the password in psql login. >It keeps prompting for the passwords. > > > Use the .pgpass file to store the password. Best Wishes, Chris Travers Metatron Technology Consulting --------------040905010600050605080509 Content-Type: text/x-vcard; charset=utf-8; name="chris.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="chris.vcf" begin:vcard fn:Chris Travers n:Travers;Chris email;internet:chris@metatrontech.com x-mozilla-html:FALSE version:2.1 end:vcard --------------040905010600050605080509--