BUG #13444: psql can't recover a pg_dump.

From: sergi(dot)casbas(at)iris(dot)cat
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13444: psql can't recover a pg_dump.
Date: 2015-06-15 10:55:17
Message-ID: 20150615105517.2730.47745@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13444
Logged by: Sergi Casbas
Email address: sergi(dot)casbas(at)iris(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniele Posenato 2015-06-15 10:56:29 After the restart of the PC, PGadmin III shows only the postgres database and not all the other local DBs
Previous Message digoal 2015-06-15 09:05:23 BUG #13443: master will remove dead rows when hot standby(use slot) disconnect