Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 92F599FB9F6 for ; Sun, 28 Oct 2007 19:19:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 54257-03 for ; Sun, 28 Oct 2007 19:18:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 339649FB976 for ; Sun, 28 Oct 2007 19:19:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l9SMIv7i008886; Sun, 28 Oct 2007 18:18:58 -0400 (EDT) To: Bob Pawley cc: Adrian Klaver , pgsql-general@postgresql.org Subject: Re: pg_restore In-reply-to: <000c01c819ae$2a89ffb0$6401a8c0@owner> References: <004401c81990$ef57e8c0$6401a8c0@owner> <200710281145.58716.aklaver@comcast.net> <005b01c819a7$65a7aea0$6401a8c0@owner> <7589.1193606901@sss.pgh.pa.us> <000c01c819ae$2a89ffb0$6401a8c0@owner> Comments: In-reply-to Bob Pawley message dated "Sun, 28 Oct 2007 15:01:58 -0700" Date: Sun, 28 Oct 2007 18:18:57 -0400 Message-ID: <8885.1193609937@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/1505 X-Sequence-Number: 122797 Bob Pawley writes: > The latest in the saga - > By using - pg_restore -h localhost -d PDW -U postgres aurel.sql > I get the message - pg_restore: input file does not appear to be a valid > archive. Oh, I just twigged that you are using a plain-SQL dump file (that is, you didn't specify -Fc or -Ft to pg_dump). For plain-SQL dumps you should not use pg_restore at all; you feed those to psql. This bites enough newbies that I'm thinking the above message ought to inclue a HINT to use psql directly. We haven't previously used hints in client-side messages but this seems to need one. Anyone have thoughts about how to phrase and format it? (BTW, I just fixed pg_restore to always mention the file name it attempted to open after getting an fopen failure.) regards, tom lane