Re: supplying password to psql on command line?

Поиск
Список
Период
Сортировка
От Christoph Dalitz
Тема Re: supplying password to psql on command line?
Дата
Msg-id 20021029085212.7d6c7579.christoph.dalitz@hs-niederrhein.de
обсуждение исходный текст
Ответ на supplying password to psql on command line?  (Stan Letovsky <stan@morgan.harvard.edu>)
Ответы Re: supplying password to psql on command line?
Re: supplying password to psql on command line?
Список pgsql-general
> Date: Mon, 28 Oct 2002 10:56:32 -0800
> From: Medi Montaseri <medi.montaseri@intransa.com>
>
> I think Font ends are moving away from this approach as others can see
> your supplied
> passwd by a simple ps(1) command.
>
There used to be a program "hide.c" available from the oracle website,
which made this impossible. Unfortunately I can no longer find it.

A simpler approach however is to supply the password from stdin.
With Oracle's sqlplus this works as follows:

    #!/bin/sh

    sqlplus <<EOF
    userid/password@tnasalias
    /* SQL commands */
    EOF

Unfortunately this does *not* work with psql because for some strange reason
psql does not read the password from stdin.

Christoph Dalitz

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

Предыдущее
От: Mario Weilguni
Дата:
Сообщение: Re: QUERY ABOUT EXPLAIN ANALYZE
Следующее
От: Karel Zak
Дата:
Сообщение: Re: cast numeric to char