From: Tom Lane <tgl@sss.pgh.pa.us>
To: Niederland <niederland@gmail.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-hackers-win32@postgresql.org
Subject: Re: pg_restore
Date: Sat, 22 Jan 2005 20:00:23 -0500
Message-ID: <17838.1106442023@sss.pgh.pa.us> (raw)
In-Reply-To: <1106163722.780395.266900@z14g2000cwz.googlegroups.com>
References: <1105992246.2309.15.camel@nx9005.localdomain>
<10020.1105993425@sss.pgh.pa.us>
<1106163722.780395.266900@z14g2000cwz.googlegroups.com>
"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?
regards, tom lane
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: tgl@sss.pgh.pa.us, niederland@gmail.com, pgsql-hackers-win32@postgresql.org
Subject: Re: pg_restore
In-Reply-To: <17838.1106442023@sss.pgh.pa.us>
References: <1105992246.2309.15.camel@nx9005.localdomain> <10020.1105993425@sss.pgh.pa.us> <1106163722.780395.266900@z14g2000cwz.googlegroups.com> <17838.1106442023@sss.pgh.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