From: | jeff(dot)casavant(at)gmail(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #12465: Materialized view dump restoration issue |
Date: | 2015-01-08 21:24:29 |
Message-ID: | 20150108212429.11502.18220@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: 12465
Logged by: Jeff Casavant
Email address: jeff(dot)casavant(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron Botsis | 2015-01-09 01:42:00 | Re: Patch: [BUGS] BUG #12320: json parsing with embedded double quotes |
Previous Message | Andrew Dunstan | 2015-01-08 20:44:44 | Re: Patch: [BUGS] BUG #12320: json parsing with embedded double quotes |