Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9co8-0003ZX-CB for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jan 2015 16:53:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y9co7-0001Ab-QD for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Jan 2015 16:53:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y9KZq-00047Q-Kg for pgsql-bugs@postgresql.org; Thu, 08 Jan 2015 21:25:10 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9KZi-0004uX-Ii for pgsql-bugs@postgresql.org; Thu, 08 Jan 2015 21:25:08 +0000 MIME-Version: 1.0 Subject: BUG #12465: Materialized view dump restoration issue To: pgsql-bugs@postgresql.org From: jeff.casavant@gmail.com Date: Thu, 08 Jan 2015 21:24:29 +0000 Message-ID: <20150108212429.11502.18220@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 The following bug has been logged on the website: Bug reference: 12465 Logged by: Jeff Casavant Email address: jeff.casavant@gmail.com PostgreSQL version: 9.4.0 Operating system: Ubuntu 14.04.1 Description: If - two functions A and B exist in the public schema - A calls B, and - a materialized view calls A then the dump produced by pg_dump or pg_dumpall will throw the following error when passed to psql -f: psql:dump.sql:7730: ERROR: function b() does not exist LINE 1: SELECT B() ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. QUERY: SELECT B() CONTEXT: SQL function "b" during inlining Code to reproduce: create function b() returns int as $$ select 1 $$ language sql; create function a() returns int as $$ select b() $$ language sql; create schema qwr; create materialized view qwr.c as select a(); Then run pg_dump | psql . Workaround: Add public to all calls to 'SET search_path' in the dump. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs