Search Postgresql Archives

Re: psql copy from through bash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux