From: | Marko Tiikkaja <marko(at)joh(dot)to> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jeff(dot)casavant(at)gmail(dot)com |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #12465: Materialized view dump restoration issue |
Date: | 2015-01-09 21:17:53 |
Message-ID: | 54B04581.1070906@joh.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2015-01-09 21:42, Tom Lane wrote:
> jeff(dot)casavant(at)gmail(dot)com writes:
>> 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();
>
> This is not a pg_dump bug, this is a broken definition of function a().
> That function will fail in any context where the caller changes
> search_path, not only pg_dump. You can perhaps get away without that
> in a single-schema database, but not with multiple schemas.
AFAIK there isn't a way to write inlineable SQL functions in relocatable
extensions in that way, since you don't know which schema they end up
installed in. The original test case comes from PostGIS.
But I think the bigger problem is that naively thinking it shouldn't be
this easy to create unrestorable databases. But perhaps I'm being
overly naive.
.marko
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-01-09 21:38:11 | Re: BUG #12465: Materialized view dump restoration issue |
Previous Message | Jefferson Casavant | 2015-01-09 20:48:17 | Re: BUG #12465: Materialized view dump restoration issue |