Re: pg_dump command inside shell scripts

Поиск
Список
Период
Сортировка
От David F. Skoll
Тема Re: pg_dump command inside shell scripts
Дата
Msg-id Pine.LNX.4.44.0210080943200.2759-100000@shishi.roaringpenguin.com
обсуждение исходный текст
Ответ на pg_dump command inside shell scripts  (Elielson Fontanezi <ElielsonF@prodam.sp.gov.br>)
Список pgsql-admin
On Tue, 8 Oct 2002, Elielson Fontanezi wrote:

> to identify Linux user which starts the shell script to avoid password
> prompt.

There's a virtually-undocmented environment variable: PGPASSWORD

    PGPASSWORD="secret-password"
    export PGPASSWORD
    # Now pg_dump will not prompt for password.
    pg_dump -U postgres ...

Make sure you only use this in a script which normal users cannot read,
and on a system which hides root-process environment variables from
being displayed by normal users (with ps).

--
David.


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

Предыдущее
От: Elielson Fontanezi
Дата:
Сообщение: pg_dump command inside shell scripts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: problems with pltcl.so