Обсуждение: Standard Input Passwords?

Поиск
Список
Период
Сортировка

Standard Input Passwords?

От
"Mike Miller"
Дата:
pg_dump -h server -Of ./temp.dmp -u username << END
username
password
END

<-- I've been trying to use this command and have always been able to
successfully dump my database via scripts.  Now, it prompts me despite this
standard input value, or any other one.  It just waits for me to enter
something.

This worked until I upgraded to 7.3.3 from 7.1.3.  Any ideas why this would
happen and how to work around it to get automatic scriped dumps?

Thanks in advance.

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


Re: Standard Input Passwords?

От
Tom Lane
Дата:
"Mike Miller" <temp6453@hotmail.com> writes:
> pg_dump -h server -Of ./temp.dmp -u username << END
> username
> password
> END

> This worked until I upgraded to 7.3.3 from 7.1.3.  Any ideas why this would
> happen and how to work around it to get automatic scriped dumps?

This is a deliberate change for security purposes: it wants to read the
password from /dev/tty not stdin.

I'd recommend that you abandon this approach and start keeping your
passwords in ~/.pgpass, instead.  See
http://developer.postgresql.org/docs/postgres/libpq-pgpass.html

            regards, tom lane