Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0C6DE1337BA6 for ; Wed, 30 Mar 2011 10:48:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 87603-10 for ; Wed, 30 Mar 2011 13:48:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rs73.luxsci.com (rs73.luxsci.com [64.49.254.135]) by mail.postgresql.org (Postfix) with ESMTP id CF3291337999 for ; Wed, 30 Mar 2011 10:48:34 -0300 (ADT) Received: from GNANAM (NSG-Static-233.156.72.182.airtel.in [182.72.156.233] (may be forged)) (authenticated bits=0) by rs73.luxsci.com (8.13.8/8.13.8) with ESMTP id p2UDmV9T030995; Wed, 30 Mar 2011 08:48:32 -0500 Reply-To: From: "Gnanakumar" To: Subject: PostgreSQL v9.0.3 Database Import Error: language "plpgsql" already exists Date: Wed, 30 Mar 2011 19:14:33 +0530 Organization: Zoniac Software Private Limited Message-ID: <007201cbeee0$9c9d9890$d5d8c9b0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acvu4JmnZS1bopWHQ9CyddaSXIu3Rw== Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.61 tagged_above=-10 required=5 tests=BAYES_00=-1.9, MAY_BE_FORGED=0.29 X-Spam-Level: X-Archive-Number: 201103/270 X-Sequence-Number: 37142 Hi, We're planning to upgrade our PostgreSQL database from v8.2.3 to v9.0.3. Before upgrading our Production server, we're trying out this complete upgrade process in a separate database server that is just exactly the replica of the production server. I already took a dump of our database using pg_dump command in v8.2.3: "/usr/local/pgsql/bin/pg_dump -D -f dbdump.sql -S mydbuser mydb" Now, after upgrading PostgreSQL to v9.0.3, I'm trying to import the database dump using: "psql -f dbdump.sql -o dbdump.log -d mydb -U mydbuser". I'm getting the following errors while importing: psql:dbdump.sql:38: ERROR: language "plpgsql" already exists psql:dbdump.sql:102646: ERROR: attempt to redefine parameter "plpgsql.variable_conflict" psql:dbdump.sql:102649: ERROR: function public.plpgsql_call_handler() does not exist I also read from 9.0 release notes that PL/pgSQL is now installed by default. http://www.postgresql.org/docs/current/interactive/release-9-0.html My question is, how do I prevent/fix this error during import. Are all these 3 errors one and the same or are they different errors that each has to be fixed separately? NOTE: We've multiple onsite customer servers that has to be upgraded to v9.0.3, hence I need to address this issue in general. Regards, Gnanam