bug in pg_restore

From: "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org>
To: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: bug in pg_restore
Date: 2002-01-18 23:28:45
Message-ID: 1011396526.19728.6.camel@heat
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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:

pg(at)carlito:/bigraid/tmp$ pg_restore -C -F custom -d rupert -v rupert.dump
pg_restore: connecting to database for restore
pg_restore: [archiver (db)] connection to database "rupert" failed: FATAL 1: Database "rupert" does not exist in the system catalog.
pg_restore: *** aborted because of error
pg(at)carlito:/bigraid/tmp$ createdb rupert
CREATE DATABASE
pg(at)carlito:/bigraid/tmp$ pg_restore -C -F custom -d rupert -v rupert.dump
pg_restore: connecting to database for restore
pg_restore: creating DATABASE rupert
pg_restore: [archiver (db)] could not execute query: ERROR: CREATE DATABASE: database "rupert" already exists
pg_restore: *** aborted because of error
pg(at)carlito:/bigraid/tmp$ pg_restore -F custom -d rupert -v rupert.dump
pg_restore: connecting to database for restore
pg_restore: creating SEQUENCE request_id
...

The dump file was created with the -C argument.

Regards,
Jeffrey

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-01-18 23:49:37 Re: bug in pg_restore
Previous Message Bruce Momjian 2002-01-18 21:42:59 Re: Need book on PHP and PostgreSQL