Search Postgresql Archives

Re: ftell mismatch with expected position

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alban Hertroys <haramrae@xxxxxxxxx> writes:
> Please refrain from top-posting.
> On 2 November 2015 at 10:48, Eelke Klein <eelke@xxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux