From: Devrim GUNDUZ <devrim@gunduz.org>
To: Hemapriya <priyam_1121@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: connect to postgres from shell scripts
Date: Mon, 22 Aug 2005 20:34:54 +0300 (EEST)
Message-ID: <Pine.LNX.4.63.0508222031520.30926@emo.org.tr> (raw)
In-Reply-To: <20050822154246.28488.qmail@web34210.mail.mud.yahoo.com>
References: <20050822154246.28488.qmail@web34210.mail.mud.yahoo.com>
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--8323328-932793750-1124732087=:30926
Content-Type: TEXT/PLAIN; CHARSET=iso-8859-9; FORMAT=flowed
Content-Transfer-Encoding: 8BIT
Content-ID: <Pine.LNX.4.63.0508222034501.30926@emo.org.tr>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
On Mon, 22 Aug 2005, Hemapriya wrote:
> I would like to know how to connect to postgres from
> shell scripts using a password protected user.
>
> Is there a way to embed the password in psql login.
> It keeps prompting for the passwords.
psql checks for PGUSER, PGPASSWORD, PGHOST, PGPORT, PGDATABASE and some
other environmental variables. Export relevant values to the parameters.
http://www.postgresql.org/docs/8.0/static/libpq-envars.html
Also there's a .pgpass file thing:
http://www.postgresql.org/docs/8.0/static/libpq-pgpass.html
Regards,
- --
Devrim GUNDUZ
Kivi Biliþim Teknolojileri - http://www.kivi.com.tr
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFDCgzAtl86P3SPfQ4RAo5PAJ9y9Pm7ii8z50ZrSB7Bws1qhQU++gCfUepu
C3ErI3WBVLPIJ8ShVPE29Dk=
=dCI+
-----END PGP SIGNATURE-----
--8323328-932793750-1124732087=:30926--
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: devrim@gunduz.org, priyam_1121@yahoo.com
Subject: Re: connect to postgres from shell scripts
In-Reply-To: <Pine.LNX.4.63.0508222031520.30926@emo.org.tr>
References: <20050822154246.28488.qmail@web34210.mail.mud.yahoo.com> <Pine.LNX.4.63.0508222031520.30926@emo.org.tr>
* 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