From: Joshua D. Drake <jd@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bob Pawley <rjpawley@shaw.ca>
Cc: Adrian Klaver <aklaver@comcast.net>
Cc: pgsql-general@postgresql.org
Subject: Re: pg_restore
Date: Sun, 28 Oct 2007 21:13:55 -0700
Message-ID: <47255E03.9070807@commandprompt.com> (raw)
In-Reply-To: <8885.1193609937@sss.pgh.pa.us>
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>
Tom Lane wrote:
> Bob Pawley <rjpawley@shaw.ca> 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
>
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: jd@commandprompt.com, tgl@sss.pgh.pa.us, rjpawley@shaw.ca, aklaver@comcast.net
Subject: Re: pg_restore
In-Reply-To: <47255E03.9070807@commandprompt.com>
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> <47255E03.9070807@commandprompt.com>
* 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