From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Szymon Guz <mabewlun(at)gmail(dot)com> |
Cc: | Kirk Wythers <wythe001(at)umn(dot)edu>, Kirk Wythers <kwythers(at)umn(dot)edu>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: psql copy from through bash |
Date: | 2013-01-11 18:40:59 |
Message-ID: | CAFj8pRBErMAxfenKLNE9PfkNx+jYi9LMjbs153usUfrGb-_5iQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
>>
>> Once more quickie. It seems that I am going to be asked for my password
>> every time psql loops through the copy statement.
>>
>> What is considered best practices to handle authentication? I am
>> connecting locally, as myself as the user and I'm being asked for my user
>> password. I added the -w (no-password) to the psql statement, but now assume
>> I need to add a .pgpass file or something.
>>
>> Suggestions?
>>
>
> Add the password to ~/.pgpass
> http://www.postgresql.org/docs/9.1/static/libpq-pgpass.html
or
PGPASSWORD=mypassword psql database -c "copy ..."
Regards
Pavel
>
> Szymon
From | Date | Subject | |
---|---|---|---|
Next Message | Jerry Sievers | 2013-01-11 20:19:41 | Re: psql copy from through bash |
Previous Message | Szymon Guz | 2013-01-11 18:36:03 | Re: psql copy from through bash |