提交 a672e965 编写于 作者: B Bruce Momjian

Prompt username/password on stderr so:

     pg_dump -o -u some_db >dump_file

works.
上级 e6487cc4
......@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.149 2000/06/02 15:57:38 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.150 2000/06/09 12:33:42 momjian Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
......@@ -490,11 +490,9 @@ prompt_for_password(char *username, char *password)
#ifdef HAVE_TERMIOS_H
struct termios t_orig,
t;
#endif
printf("Username: ");
fprintf(stderr, "Username: ");
fgets(username, 100, stdin);
length = strlen(username);
/* skip rest of the line */
......@@ -508,7 +506,7 @@ prompt_for_password(char *username, char *password)
if (length > 0 && username[length - 1] == '\n')
username[length - 1] = '\0';
printf("Password: ");
fprintf(stderr, "Password: ");
#ifdef HAVE_TERMIOS_H
tcgetattr(0, &t);
t_orig = t;
......@@ -532,7 +530,7 @@ prompt_for_password(char *username, char *password)
if (length > 0 && password[length - 1] == '\n')
password[length - 1] = '\0';
printf("\n\n");
fprintf(stderr, "\n\n");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册