Re: Postgres in bash-mode

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Postgres in bash-mode
Дата
Msg-id Pine.LNX.4.30.0201102341320.2937-100000@peter.localdomain
обсуждение исходный текст
Ответ на Postgres in bash-mode  (Alexander Pucher <pucher@atlas.gis.univie.ac.at>)
Список pgsql-hackers
Alexander Pucher writes:

> In MySQL, I did it like this:
>
> 'mysql -u user -ppassword < script.sh'

Then you might as well not have any authentication at all, because every
user on your system can then read the password off the "ps" output.

> My problem is that I can't find a way to put the password in an 'psql'
> statement at the prompt.

You can put it into the environment variable PGPASSWORD, but that *might*
suffer from the same problems depending on your OS.  If you want real
noninteractive login you will have to use a different authentication
method, such as ident.

-- 
Peter Eisentraut   peter_e@gmx.net



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

Предыдущее
От: "Rod Taylor"
Дата:
Сообщение: Re: Postgres in bash-mode
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pg_upgrade