Re: psql copy from through bash

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: psql copy from through bash
Дата
Msg-id CAFj8pRBErMAxfenKLNE9PfkNx+jYi9LMjbs153usUfrGb-_5iQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql copy from through bash  (Szymon Guz <mabewlun@gmail.com>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Szymon Guz
Дата:
Сообщение: Re: psql copy from through bash
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: psql copy from through bash