scripts and ~/.psqlrc

From: teknet(at)poczta(dot)onet(dot)pl
To: pgsql-admin(at)postgresql(dot)org
Subject: scripts and ~/.psqlrc
Date: 2005-10-15 16:08:12
Message-ID: 20051015160813Z1262521-16585+5@kps6.test.onet.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Frost 2005-10-15 17:28:03 Re: archive_command
Previous Message teknet 2005-10-15 15:42:56 subscribe-digest pgsql-admin