Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4TUz-00016B-DY for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jun 2015 12:28:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z4TUy-0003Gl-Ul for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jun 2015 12:28:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z4S3i-0002yJ-MY for pgsql-bugs@postgresql.org; Mon, 15 Jun 2015 10:56:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Z4S3f-0003SL-Gl for pgsql-bugs@postgresql.org; Mon, 15 Jun 2015 10:56:05 +0000 MIME-Version: 1.0 Subject: BUG #13444: psql can't recover a pg_dump. To: pgsql-bugs@postgresql.org From: sergi.casbas@iris.cat Date: Mon, 15 Jun 2015 10:55:17 +0000 Message-ID: <20150615105517.2730.47745@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) 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: 13444 Logged by: Sergi Casbas Email address: sergi.casbas@iris.cat PostgreSQL version: 9.4.4 Operating system: Debian 8 Description: When I try to recover a dump made with pg_dump, psql can't recovery some materialized views because the views use a function that is not created yet in the dump sql. Example: SET check_function_bodies = false; SET client_min_messages = warning; SET default_tablespace = ''; SET search_path = public, pg_catalog; CREATE MATERIALIZED VIEW testmview AS SELECT publicz.testfunc() AS testfunc WITH NO DATA; CREATE SCHEMA publicz; SET search_path = publicz, pg_catalog; CREATE FUNCTION testfunc() RETURNS integer LANGUAGE sql AS $$SELECT 1;$$; If we swap the order between public an publicz creation it works. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs