Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B4F0E4764A9 for ; Wed, 27 Nov 2002 09:54:59 -0500 (EST) Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by postgresql.org (Postfix) with ESMTP id 6921F476D0C for ; Wed, 27 Nov 2002 09:33:07 -0500 (EST) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.12.6/8.12.6/Debian-6Woody) with SMTP id gAREWppq018077; Wed, 27 Nov 2002 09:32:51 -0500 Reply-To: From: "Nick Fankhauser" To: "Oliver Elphick" Cc: "pgsql-admin" Subject: Re: pg_restore error: function plpgsql_call_handleralready exists with same argument types Date: Wed, 27 Nov 2002 09:28:51 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <1038405650.13298.85.camel@linda.lfix.co.uk> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/278 X-Sequence-Number: 6466 Oliver- Thanks for the idea. Unfortunately, it still won't go. We've never touched template1, but just to make sure, I tried using template0 to ensure an empty DB with the same results: nickf@morgai:~$ createdb -D PG_ALPHA -T template0 test CREATE DATABASE nickf@morgai:~$ pg_restore -dalpha test.dump.tar pg_restore: [archiver (db)] could not execute query: ERROR: function plpgsql_call_handler already exists with same argument types nickf@morgai:~$ I'm a bit surprised about this one, because we're running a plain 7.2 (debian package) installation & it seems as if this is a standard sort of operation that other people would be using often. -Nick > It sounds as though you are trying to restore an item which is already > in the database. Perhaps this snippet from the pg_restore man page may > be relevent: > > If your installation has any local additions to the template1 > database, be careful to load the output of pg_restore into a > truly empty database; otherwise you are likely to get errors due > to duplicate definitions of the added objects. To make an empty > database without any local additions, copy from template0 not > template1, for example: > > CREATE DATABASE foo WITH TEMPLATE = template0;