Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 077119FA48D for ; Mon, 29 Oct 2007 01:15:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 71898-03 for ; Mon, 29 Oct 2007 01:15:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id C852C9FA284 for ; Mon, 29 Oct 2007 01:15:37 -0300 (ADT) Received: from [192.168.1.4] (or-69-34-217-90.sta.embarqhsd.net [69.34.217.90]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l9T4Far7031616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 28 Oct 2007 21:15:40 -0700 Message-ID: <47255E03.9070807@commandprompt.com> Date: Sun, 28 Oct 2007 21:13:55 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.13 (Windows/20070809) MIME-Version: 1.0 To: Tom Lane CC: Bob Pawley , Adrian Klaver , pgsql-general@postgresql.org Subject: Re: pg_restore References: <004401c81990$ef57e8c0$6401a8c0@owner> <200710281145.58716.aklaver@comcast.net> <005b01c819a7$65a7aea0$6401a8c0@owner> <7589.1193606901@sss.pgh.pa.us> <000c01c819ae$2a89ffb0$6401a8c0@owner> <8885.1193609937@sss.pgh.pa.us> In-Reply-To: <8885.1193609937@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.91.1, clamav-milter version 0.91.1 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Sun, 28 Oct 2007 21:15:41 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/1512 X-Sequence-Number: 122804 Tom Lane wrote: > 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? Honestly, I would prefer we just fix pg_restore to be able to use plain text format. The fact that it doesn't is a serious lack of consistency within our client side apps. E.g; it is completely counter-intuitive to require our "client user interface" to be used for restoration when there is a "pg_restore" sitting in the bin directory. Sincerely, Joshua D. Drake > > (BTW, I just fixed pg_restore to always mention the file name it > attempted to open after getting an fopen failure.) > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >