Re: pg_restore

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bob Pawley <rjpawley(at)shaw(dot)ca>, Adrian Klaver <aklaver(at)comcast(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_restore
Date: 2007-10-29 04:13:55
Message-ID: 47255E03.9070807@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Bob Pawley <rjpawley(at)shaw(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kalra, Ashwani 2007-10-29 06:50:36 Automatic schema updates
Previous Message Andreas 2007-10-29 01:59:37 Re: Version 8.3