Re: Pass password in scripts?

Поиск
Список
Период
Сортировка
От Jan Danielsson
Тема Re: Pass password in scripts?
Дата
Msg-id 45D3B7F3.7060502@gmail.com
обсуждение исходный текст
Ответ на Pass password in scripts?  ("Neil Aggarwal" <neil@JAMMConsulting.com>)
Ответы Re: Pass password in scripts?
Список pgsql-novice
Neil Aggarwal wrote:
> Hello:
>
> I have several scripts I would like to run against a database.
>
> With mysql, I can pass the password to the database in
> the command line call to the terminal client.
>
> Is there a way to do that with psql?

   You mean like:

$ psql --user=foobar --password=boofar < script.sql

   Another possibility, if you don't want the password to be visible to
other users on the system, is to use the ~/.pgpass file. See:
http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html

--
Kind regards,
Jan Danielsson



Вложения

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

Предыдущее
От: "Burak Seydioglu"
Дата:
Сообщение: Re: Pass password in scripts?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Pass password in scripts?