Skip site navigation (1) Skip section navigation (2)

Re: scripts and ~/.psqlrc

From: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
To: teknet(at)poczta(dot)onet(dot)pl, pgsql-admin(at)postgresql(dot)org
Subject: Re: scripts and ~/.psqlrc
Date: 2005-10-18 20:24:11
Message-ID: C45835824D00A844BBD0F032D5CDED9202D554BA@pisgana01sxch01.ana.firstamdata.com (view raw or flat)
Thread:
Lists: pgsql-admin
 
" PGPASSWORD sets the password used if the server demands password
authentication. Use of this environment variable is not recommended for
security reasons (some operating systems allow non-root users to see
process environment variables via ps); instead consider using the
~/.pgpass file  "


-- 
 Husam 


-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of
teknet(at)poczta(dot)onet(dot)pl
Sent: Saturday, October 15, 2005 9:08 AM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] scripts and ~/.psqlrc

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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
       message can get through to the mailing list cleanly

**********************************************************************
This message contains confidential information intended only for the 
use of the addressee(s) named above and may contain information that 
is legally privileged.  If you are not the addressee, or the person 
responsible for delivering it to the addressee, you are hereby 
notified that reading, disseminating, distributing or copying this 
message is strictly prohibited.  If you have received this message by 
mistake, please immediately notify us by replying to the message and 
delete the original message immediately thereafter.

Thank you.                                       FADLD Tag
**********************************************************************


pgsql-admin by date

Next:From: Kevin GrittnerDate: 2005-10-18 20:29:00
Subject: Re: PostgreSQL running in the background....
Previous:From: Andrew SullivanDate: 2005-10-18 16:13:51
Subject: Re: Solving OID wrap-around in 7.4 DB?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group