pg_restore blues

From: Allan Engelhardt <allane(at)cybaea(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: pg_restore blues
Date: 2001-10-16 17:42:19
Message-ID: 3BCC717B.2020500@cybaea.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

OK, I'm probably doing something very stupid, but can somebody explain how I'm supposed to restore a custom archive dump?

$ createdb foo
CREATE DATABASE
$ psql foo
foo=# create table users (id serial);
NOTICE: CREATE TABLE will create implicit sequence 'users_id_seq' for SERIAL column 'users.id'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'users_id_key' for table 'users'
CREATE
foo=# \q
$ pg_dump --blobs --clean --create --file=/tmp/foo.dump --format=c --compress=9 foo
$ dropdb foo
DROP DATABASE
$ pg_restore --create -d test /tmp/foo.dump
Archiver(db): Could not execute query. Code = 7. Explanation from backend: 'ERROR: ProcedureCreate: procedure pltcl_call_handler already exists with same arguments
'.
$ pg_restore --create --clean -d test /tmp/foo.dump
Archiver(db): Could not execute query. Code = 7. Explanation from backend: 'ERROR: index "users_id_key" does not exist
'.

What's the magic command that I am looking for??

Allan

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2001-10-16 20:14:55 Re: tcl wish--simple configure problem
Previous Message Nick Fankhauser 2001-10-16 16:23:51 Re: What may be the url we need to use to connect the Postgres Database with Java