Re: LINE COMMAND

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LINE COMMAND
Дата
Msg-id 4649.1281970787@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LINE COMMAND  (Felipe Lopes <felipelopess@gmail.com>)
Список pgsql-bugs
Felipe Lopes <felipelopess@gmail.com> writes:
> I would like to run a line command (psql) with the supplied password without
> pausing the command, but this option is not available:

> psql --username=root --password=root my_bd < "script.sql"

This is intentionally not supported.  If it were supported it would be
insecure.  On most operating systems, every process in the machine can
see whatever is on the command line of every other process ... including
your password, if you were doing something like the above.

The recommended solution if you don't want to key in the password
separately is to use a .pgpass file.  See
http://www.postgresql.org/docs/8.4/static/libpq-pgpass.html

            regards, tom lane

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

Предыдущее
От: Mike Fowler
Дата:
Сообщение: Re: LINE COMMAND
Следующее
От: Felipe Lopes
Дата:
Сообщение: Re: LINE COMMAND