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

Commite1a7d1b

Browse files
committed
Avoid changing stdin/stdout to binary mode on Windows unless that is
really the source or destination of the archive. I think this willresolve recent complaints that password prompting is broken in pg_restoreon Windows. Note that password prompting and reading from stdin is anunworkable combination on Windows ... but that was true anyway.
1 parentd134889 commite1a7d1b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.114 2005/08/23 22:40:31 tgl Exp $
18+
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.115 2005/09/11 00:36:14 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -1601,11 +1601,12 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
16011601

16021602
/*
16031603
* On Windows, we need to use binary mode to read/write non-text archive
1604-
* formats. Force stdin/stdout into binary modein case that is what
1604+
* formats. Force stdin/stdout into binary modeif that is what
16051605
* we are using.
16061606
*/
16071607
#ifdefWIN32
1608-
if (fmt!=archNull)
1608+
if (fmt!=archNull&&
1609+
(AH->fSpec==NULL||strcmp(AH->fSpec,"")==0))
16091610
{
16101611
if (mode==archModeWrite)
16111612
setmode(fileno(stdout),O_BINARY);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp