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