| From: | Antti Haapala <antti(dot)haapala(at)iki(dot)fi> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Andrew Sullivan <andrew(at)libertyrms(dot)info>, ML-Postrges-general <Pgsql-General(at)postgresql(dot)org> |
| Subject: | Re: pg_dump automatic |
| Date: | 2003-01-27 07:06:11 |
| Message-ID: | Pine.GSO.4.44.0301270856350.6710-100000@paju.oulu.fi |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
> >> I have a password on the database, so when the file is executed it prompt
> >> for the password.
>
> > You could try setting the PGPASSWORD environment variable in your
> > script. I believe someone told me it was getting set to go away,
> > though, so it may not help. If your OS supports it, ident over UNIX
> > domain sockets is more secure.
>
> PGPASSWORD is insecure on platforms where others can see your
> environment variables (which is quite a few Unixen, but not all).
> I am not sure we will remove it, but as of 7.3 it's definitely
> deprecated. You can put passwords in ~/.pgpass instead.
I think it could be a good idea to add an option which specifies which
file descriptor should be used for reading passwords?
Then shells could invoke programs like this:
psql -U xyz template1 --password-fd=4 < my_data 4< /the/password/file/you/want/to/use
And there would be no need to use any files for Perl/C/etc.
--
Antti Haapala
| From | Date | Subject | |
|---|---|---|---|
| Next Message | will trillich | 2003-01-27 07:06:42 | Re: too many users for postgresql? :) |
| Previous Message | will trillich | 2003-01-27 06:48:17 | Re: too many users for postgresql? :) |