Re: bug in pg_restore - Mailing list pgsql-general

From Tom Lane
Subject Re: bug in pg_restore
Date
Msg-id 11130.1011400455@sss.pgh.pa.us
Whole thread Raw
In response to Re: bug in pg_restore  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> On 18 Jan 2002, Jeffrey W. Baker wrote:
>> I think there is a little bug in pg_restore.  It says it can't restore
>> because the database doesn't exist, but then if I create the database it
>> says it can't proceed because the database DOES exist.  The solution for
>> me was to omit the -C argument, but it looks like a bug to me:

> I think the intention is that with -C, the -d argument is the database
> to connect to before generating the create for the database that's
> specified in the dump, not the final name of the database.

Yeah.  The 7.1 documentation is very confusing on this point.
I tried awhile ago to clean it up for 7.2.  You might care to look at
http://developer.postgresql.org/docs/postgres/app-pgdump.html
http://developer.postgresql.org/docs/postgres/app-pgrestore.html
(there might be some stuff in there that's new for 7.2, but these
switches didn't change).

            regards, tom lane

pgsql-general by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Re: Need book on PHP and PostgreSQL
Next
From: Jan Wieck
Date:
Subject: Re: large file limitation