Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita672e96

Browse files
committed
Prompt username/password on stderr so:
pg_dump -o -u some_db >dump_fileworks.
1 parente6487cc commita672e96

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.149 2000/06/02 15:57:38 momjian Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.150 2000/06/09 12:33:42 momjian Exp $
2626
*
2727
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2828
*
@@ -490,11 +490,9 @@ prompt_for_password(char *username, char *password)
490490

491491
#ifdefHAVE_TERMIOS_H
492492
structtermiost_orig,
493-
t;
494-
495493
#endif
496494

497-
printf("Username: ");
495+
fprintf(stderr,"Username: ");
498496
fgets(username,100,stdin);
499497
length=strlen(username);
500498
/* skip rest of the line */
@@ -508,7 +506,7 @@ prompt_for_password(char *username, char *password)
508506
if (length>0&&username[length-1]=='\n')
509507
username[length-1]='\0';
510508

511-
printf("Password: ");
509+
fprintf(stderr,"Password: ");
512510
#ifdefHAVE_TERMIOS_H
513511
tcgetattr(0,&t);
514512
t_orig=t;
@@ -532,7 +530,7 @@ prompt_for_password(char *username, char *password)
532530
if (length>0&&password[length-1]=='\n')
533531
password[length-1]='\0';
534532

535-
printf("\n\n");
533+
fprintf(stderr,"\n\n");
536534
}
537535

538536

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp