Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9GI5IP18187 for ; Tue, 16 Oct 2001 14:05:18 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f9GHgAL88501 for pgsql-admin@postgresql.org; Tue, 16 Oct 2001 13:42:10 -0400 (EDT) (envelope-from news) From: Allan Engelhardt X-Newsgroups: comp.databases.postgresql.admin Subject: pg_restore blues Date: Tue, 16 Oct 2001 18:42:19 +0100 Organization: http://cybaea.com/ Lines: 25 Message-ID: <3BCC717B.2020500@cybaea.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012 X-Accept-Language: en-us To: pgsql-admin@postgresql.org X-Archive-Number: 200110/141 X-Sequence-Number: 2386 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