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

Поиск
Список
Период
Сортировка
Искать
От
firstname lastname
Тема
Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices
Дата
Msg-id
136380404.83820.1531950460781@webmail.hostway.com
Ответ на
Список
Дерево обсуждения
BUG #15263: pg_dump / psql failure. When loading,psql does not see function-based constraints or indices PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: BUG #15263: pg_dump / psql failure. When loading, psql does not see function-based constraints or indices "ceccareb@talusmusic.com" <ceccareb@talusmusic.com>
Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices firstname lastname <ceccareb@talusmusic.com>
Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices Alvaro Herrera <alvherre@2ndquadrant.com>
Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices "David G. Johnston" <david.g.johnston@gmail.com>
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 copy his 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 the database 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  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
В списке pgsql-bugs по дате отправления
FAQ