[repost] pg_restore doesn't work with custom format? - Mailing list pgsql-admin

From Allan Engelhardt
Subject [repost] pg_restore doesn't work with custom format?
Date
Msg-id 3BD0408E.2090908@cybaea.com
Whole thread Raw
Responses Re: [repost] pg_restore doesn't work with custom format?
List pgsql-admin
This looks like a bug, or 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


pgsql-admin by date:

Previous
From: Brian McCane
Date:
Subject: Re: Please help - tks
Next
From: Stephan Szabo
Date:
Subject: Re: VACUUMing a live site OK?