Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices - Mailing list pgsql-bugs

From firstname lastname
Subject Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices
Date
Msg-id 136380404.83820.1531950460781@webmail.hostway.com
Whole thread Raw
In response to Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices
Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices
List pgsql-bugs
Peter,

Both of your suggestions work.    I opted to change the search path in the dump file.  The alternative is is to prefix
"public"to hundreds of functions.   I do not want to do that.  Too much work.    In the end, a person should be able to
copyhis objects a different schema; therefore, one would not want to hard-code a schema name to every object.
 

Do you consider #15263 a bug?    Or starting with 10.x, is this expected behavior?

I attached a zip file.   runtest.sh duplicates the problem automatically for you.   And you are correct, when I create
thedatabase with schema_with_explicit_public.sql, psql loads the dump correctly.
 


Thanks for your help,

Brian

> On July 13, 2018 at 3:19 AM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
> 
> 
> On 07.07.18 16:50, ceccareb@talusmusic.com wrote:
> > Seems like a reasonable diagnosis.   Apparently someone introduced this problem into 10.x.  9 works fine.  
> > 
> > Is there anything I can do?   Or do know if someone is trying to fix this one?
> 
> It looks like you might need to fix up your functions to handle schema
> search path changes.  Either do SET search_path inside the function or
> attached to the function definition, or explicitly schema-qualify the
> function calls.
> 
> -- 
> Peter Eisentraut              http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15282: Materialized view with transitive TYPE dependency fails refresh using pg_restore and psql
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices