Re: ftell mismatch with expected position
| От | Tom Lane |
|---|---|
| Тема | Re: ftell mismatch with expected position |
| Дата | |
| Msg-id | 23854.1446474615@sss.pgh.pa.us обсуждение |
| Ответ на | Re: ftell mismatch with expected position (Alban Hertroys <haramrae@gmail.com>) |
| Ответы |
Re: ftell mismatch with expected position
|
| Список | pgsql-general |
Alban Hertroys <haramrae@gmail.com> writes:
> Please refrain from top-posting.
> On 2 November 2015 at 10:48, Eelke Klein <eelke@bolt.nl> wrote:
>> Normally we call this from within our windows program where a lot of code is
>> involved for setting up the environment, and creating the pipes and
>> redirecting stdout, stderr and stdin. However I believe it is the same
>> problem that can be caused with the following commandline in cmd.exe but you
>> will need to have Coreutils for windows installed to get the cat command.
>>
>> pg_dump.exe -U postgres --format=c mydb | cat > backupfile
> Do you also get the warning if you split those commands up, and if so,
> in which one?
Presumably it doesn't happen without the use of the pipe notation.
I suspect that what's happening is that stdout isn't getting put into
binary mode, so that Microsoft's CR/NL translation corrupts the data.
If that's true, though, the resulting backup file should be corrupt;
is it valid according to "pg_restore backupfile"?
regards, tom lane
В списке pgsql-general по дате отправления: