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
обсуждение исходный текст
Ответ на 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  (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>)
Список 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
Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15282: Materialized view with transitive TYPE dependency fails refresh using pg_restore and psql
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #15263: pg_dump / psql failure. When loading, psql does notsee function-based constraints or indices