pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedscripts and ~/.psqlrc
3+ messages / 3 participants
[nested] [flat]
* scripts and ~/.psqlrc
@ 2005-10-15 16:08 teknet@poczta.onet.pl
2005-10-15 21:03 ` Re: scripts and ~/.psqlrc Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 3+ messages in thread
From: teknet@poczta.onet.pl @ 2005-10-15 16:08 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: scripts and ~/.psqlrc
2005-10-15 16:08 scripts and ~/.psqlrc teknet@poczta.onet.pl
@ 2005-10-15 21:03 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2005-10-15 21:03 UTC (permalink / raw)
To: pgsql-admin; +Cc: teknet@poczta.onet.pl
teknet@poczta.onet.pl wrote:
> 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
The file you are looking for is ".pgpass".
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: scripts and ~/.psqlrc
@ 2005-10-18 20:24 Tomeh, Husam <htomeh@firstam.com>
0 siblings, 0 replies; 3+ messages in thread
From: Tomeh, Husam @ 2005-10-18 20:24 UTC (permalink / raw)
To: teknet@poczta.onet.pl; 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@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of
teknet@poczta.onet.pl
Sent: Saturday, October 15, 2005 9:08 AM
To: pgsql-admin@postgresql.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@postgresql.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
**********************************************************************
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-10-18 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-15 16:08 scripts and ~/.psqlrc teknet@poczta.onet.pl
2005-10-15 21:03 ` Peter Eisentraut <peter_e@gmx.net>
2005-10-18 20:24 Re: scripts and ~/.psqlrc Tomeh, Husam <htomeh@firstam.com>
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