From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Niederland <niederland@gmail.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-hackers-win32@postgresql.org
Subject: Re: [pgsql-hackers-win32] pg_restore
Date: Sun, 23 Jan 2005 11:08:01 -0500 (EST)
Message-ID: <200501231608.j0NG81h01779@candle.pha.pa.us> (raw)
In-Reply-To: <17838.1106442023@sss.pgh.pa.us>
Tom Lane wrote:
> "Niederland" <niederland@gmail.com> writes:
> > System: the released Postgres 8.0, winXP
>
> > Using:
> > pg_dump --format=t --blobs myDB > DBFile
> > pg_restore --create -dbname=crm DBFile
>
> > Resulted in:
> > pg_restore: [archiver] unsupported version (1.13) in file header
>
> Come to think of it, I'll bet that you cannot use "> DBFile" on Windows
> because it ends up opening the archive file in text instead of binary
> mode. SetOutput() in pg_backup_archiver.c tries to work around this by
> doing
>
> fn = fileno(stdout);
> AH->OF = fdopen(dup(fn), PG_BINARY_W);
>
> but it wouldn't surprise me in the least to learn that that doesn't work
> on Windows.
>
> Does it work if you use
> pg_dump --format=t --blobs -f DBFile myDB
> ? Can anyone on pgsql-hackers-win32 think of a way around this?
I never considered the distinction of binary/text mode on ">" but I can
see it could certainly be an issue.
Do we have to start suggesting "-f" for all scripts just so Win32 is OK?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, niederland@gmail.com, pgsql-hackers-win32@postgresql.org
Subject: Re: [pgsql-hackers-win32] pg_restore
In-Reply-To: <200501231608.j0NG81h01779@candle.pha.pa.us>
References: <17838.1106442023@sss.pgh.pa.us> <200501231608.j0NG81h01779@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox