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

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: sergi(dot)casbas(at)iris(dot)cat
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13444: psql can't recover a pg_dump.
Date: 2015-06-15 17:36:30
Message-ID: CAMkU=1xvW3WbdNqReDtk--TksVZO8ZidCnr2cCdnD2RVJJCBTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jun 15, 2015 at 3:55 AM, <sergi(dot)casbas(at)iris(dot)cat> wrote:

> 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.
>

I can't reproduce this. When I create this schema in 9.4.4 and then run
9.4.4's pg_dump on it, it gives them to me
in the proper order. Was the original dump created from 9.4.4 or some
earlier version? Does there need to be some other objects present to
trigger this bad order?

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Fabien COELHO 2015-06-15 18:34:18 Re: BUG #13442: ISBN doesn't always roundtrip with text
Previous Message Tom Lane 2015-06-15 17:26:15 Re: BUG #13442: ISBN doesn't always roundtrip with text