Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YQ3tN-0008Oa-HO for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Feb 2015 01:02:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YQ3tM-0002tJ-VG for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Feb 2015 01:02:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YQ3tL-0002qj-LP for pgsql-bugs@postgresql.org; Tue, 24 Feb 2015 01:02:27 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YQ3tI-0007Vt-IB for pgsql-bugs@postgresql.org; Tue, 24 Feb 2015 01:02:25 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 17FB814CD54B for ; Mon, 23 Feb 2015 17:02:24 -0800 (PST) Date: Mon, 23 Feb 2015 18:02:23 -0700 (MST) From: David G Johnston To: pgsql-bugs@postgresql.org Message-ID: <1424739743940-5839131.post@n5.nabble.com> In-Reply-To: <54EBA91C.1020907@pgmasters.net> References: <54EBA91C.1020907@pgmasters.net> Subject: Re: View restore error in 9.3-9.4 upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org David Steele wrote > I upgraded from 9.3 to 9.4 last week using pg_dumpall and psql to dump > and import the database. I got an error during the creation of one of > the views and ended up having to patch the pl/pgsql manually to complete > the migration. > > I've attached the relevant view and the function/views it depends on > (view-bug.sql). To reproduce the issue: > > On a 9.3 cluster: > >> createdb test >> psql -f view-bug.sql test >> pg_dump test > test.dump Is the version of pg_dump 9.3 here? When upgrading to a new release you should use the newer (in this case 9.4) version of pg_dump to perform the migration dump. What are the exact releases of 9.3 and 9.4 upon which you are operating? Does the dump restore into 9.3 correctly? > psql:test.dump:151: ERROR: column reference "query" is ambiguous > LINE 13: pg_stat_activity.query, A quick visual doesn't spring anything obvious. I haven't attempted to reproduce via the supplied scripts. David J. -- View this message in context: http://postgresql.nabble.com/View-restore-error-in-9-3-9-4-upgrade-tp5839120p5839131.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs