X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7BF163A4FE0; Sun, 23 Jan 2005 01:00:26 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32809-02; Sun, 23 Jan 2005 01:00:21 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 55C873A4F95; Sun, 23 Jan 2005 01:00:24 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j0N10NIL017839; Sat, 22 Jan 2005 20:00:23 -0500 (EST) To: "Niederland" Cc: pgsql-general@postgresql.org, pgsql-hackers-win32@postgresql.org Subject: Re: pg_restore 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> Comments: In-reply-to "Niederland" message dated "19 Jan 2005 11:42:02 -0800" Date: Sat, 22 Jan 2005 20:00:23 -0500 Message-ID: <17838.1106442023@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/1225 X-Sequence-Number: 72174 "Niederland" 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