From: teknet@poczta.onet.pl
To: pgsql-admin@postgresql.org
Subject: scripts and ~/.psqlrc
Date: Sat, 15 Oct 2005 18:08:12 +0200
Message-ID: <20051015160813Z1262521-16585+5@kps6.test.onet.pl> (raw)
Hello
I want to write some scripts which could connect to databse and work in background. I want to avoid situation in which i have to manually/interactively give appriopriate password everytime i query database.
How can i do it in most easily way ?
I found that there is ~/.psqlrc file which could be used as configuration file for user. Can i put there databsename, hostname, username and most important: password ?, so i could connect to my database only by typing:
#psql
Thanx
Michal
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: teknet@poczta.onet.pl
Subject: Re: scripts and ~/.psqlrc
In-Reply-To: <20051015160813Z1262521-16585+5@kps6.test.onet.pl>
References: <20051015160813Z1262521-16585+5@kps6.test.onet.pl>
* 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